backport v6#5
Open
callycodes wants to merge 2279 commits intoZenningAI:mainfrom
Open
Conversation
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ `main` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `main`.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ # Releases ## ai@7.0.0-beta.76 ### Major Changes - fcc6869: refactor(ai/core): rename `ModelCallStreamPart` to `LanguageModelStreamPart` and align stream model call naming (`streamLanguageModelCall`, `experimental_streamLanguageModelCall`). This updates experimental low-level stream primitives to use "language model call" terminology consistently. ## @ai-sdk/angular@3.0.0-beta.76 ### Patch Changes - Updated dependencies [fcc6869] - ai@7.0.0-beta.76 ## @ai-sdk/langchain@3.0.0-beta.76 ### Patch Changes - Updated dependencies [fcc6869] - ai@7.0.0-beta.76 ## @ai-sdk/llamaindex@3.0.0-beta.76 ### Patch Changes - Updated dependencies [fcc6869] - ai@7.0.0-beta.76 ## @ai-sdk/otel@1.0.0-beta.22 ### Patch Changes - Updated dependencies [fcc6869] - ai@7.0.0-beta.76 ## @ai-sdk/react@4.0.0-beta.76 ### Patch Changes - Updated dependencies [fcc6869] - ai@7.0.0-beta.76 ## @ai-sdk/rsc@3.0.0-beta.77 ### Patch Changes - Updated dependencies [fcc6869] - ai@7.0.0-beta.76 ## @ai-sdk/svelte@5.0.0-beta.76 ### Patch Changes - Updated dependencies [fcc6869] - ai@7.0.0-beta.76 ## @ai-sdk/vue@4.0.0-beta.76 ### Patch Changes - Updated dependencies [fcc6869] - ai@7.0.0-beta.76 Co-authored-by: vercel-ai-sdk[bot] <225926702+vercel-ai-sdk[bot]@users.noreply.github.com>
…13929) ## Background google vertex announced that models on vertex can stream the arguments of a single function call in multiple parts/contents/responses. the aisdk supports this via `tool-input-delta` but google vertex needed more plumbing #11126 ## Summary - emit warning when using this config with non-vertex providers - Vertex sends the arguments as `partialArgs` objects with typed values and JSON paths ```json { "jsonPath": "$.location", "stringValue": "Boston", "willContinue": true } { "jsonPath": "$.location", "stringValue": ", MA" } { "jsonPath": "$.brightness", "numberValue": 50 } ``` which needs to be concatenated across chunks. and hence we need a tracking state in `accumulatedArgs` - we need `applyPartialArgs` function to do the conversion for `tool-input-delta` expecting a string instead of an object - we also track tool call boundaries - google signals start with `name` + `willContinue: true` and end with an empty functionCall: {} ## Manual Verification verified by running `examples/ai-functions/src/stream-text/google/vertex-stream-function-call-args.ts` with and without the providerOption defined ### before https://github.com/user-attachments/assets/b4f921e2-60b4-429f-8556-526ffa4e0de0 ### after https://github.com/user-attachments/assets/bb29d1b8-787e-4f42-a395-23de34ec2d94 ## Checklist - [x] Tests have been added / updated (for bug fixes / features) - [ ] Documentation has been added / updated (for bug fixes / features) - [x] A _patch_ changeset for relevant packages has been added (for bug fixes / features - run `pnpm changeset` in the project root) - [x] I have reviewed this pull request (self-review) ## Related Issues fixes #11126
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ `main` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `main`.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ # Releases ## @ai-sdk/google@4.0.0-beta.32 ### Patch Changes - 5036db8: feat(google-vertex): add support for streaming tool arguments input ## @ai-sdk/google-vertex@5.0.0-beta.41 ### Patch Changes - Updated dependencies [5036db8] - @ai-sdk/google@4.0.0-beta.32 Co-authored-by: vercel-ai-sdk[bot] <225926702+vercel-ai-sdk[bot]@users.noreply.github.com>
## Background DevTools does not currently document how it should be used in a monorepo setup. When running the viewer from the monorepo root, no runs or steps appear in the UI, which can be confusing. ## Summary Add a "Monorepo usage" section to clarify that DevTools must be started from the same workspace where the AI SDK code is executed (e.g. `apps/api`), instead of the monorepo root. ## Checklist - [ ] Tests have been added / updated (for bug fixes / features) - [x] Documentation has been added / updated (for bug fixes / features) - [ ] A _patch_ changeset for relevant packages has been added (for bug fixes / features - run `pnpm changeset` in the project root) - [x] I have reviewed this pull request (self-review) --------- Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com> Co-authored-by: Aayush Kapoor <83492835+aayush-kapoor@users.noreply.github.com>
## Background This change was necessary to provide access to ZeroEntropy embeddings and reranker models. ## Summary Added documentation for a community integration to ZeroEntropy models. ## Checklist Please check if the PR fulfills the following requirements: --> - [ ] Tests have been added / updated (for bug fixes / features) - [x ] Documentation has been added / updated (for bug fixes / features) - [ ] A _patch_ changeset for relevant packages has been added (for bug fixes / features - run `pnpm changeset` in the project root) - [ ] I have reviewed this pull request (self-review)
## Background if a model returns an invalid input for a tool call, the AISDK properly attaches it as a tool-error and sends it back to the model. however, when sending the message history back, the tool-input field still refers the broken json input and thus breaks any future model response (observed in Anthropic as : `invalid_request_error `) #13892 ## Summary when building the response messages, if a tool cal input is invalid + is not a valid JSON, we pass an empty `{ }` back as tool input so that model response doesn't break. ## Manual Verification verified by running the repro below <details> <summary> repro </summary> ```ts import { anthropic } from '@ai-sdk/anthropic'; import { generateText, isStepCount, tool } from 'ai'; import { MockLanguageModelV3 } from 'ai/test'; import { z } from 'zod'; import { run } from '../../lib/run'; run(async () => { // Turn 1: Mock LLM returns a tool call with invalid JSON args. const result1 = await generateText({ model: new MockLanguageModelV3({ doGenerate: async () => ({ warnings: [], usage: { inputTokens: { total: 10, noCache: 10, cacheRead: undefined, cacheWrite: undefined, }, outputTokens: { total: 20, text: 20, reasoning: undefined, }, }, finishReason: { raw: undefined, unified: 'tool-calls' }, content: [ { type: 'tool-call', toolCallType: 'function', toolCallId: 'call-1', toolName: 'weather', input: `{ city: San Francisco, }`, }, ], }), }), tools: { weather: tool({ inputSchema: z.object({ city: z.string() }), execute: async ({ city }) => `Sunny in ${city}`, }), }, prompt: 'What is the weather in San Francisco?', stopWhen: isStepCount(1), }); // Turn 2: Send the (potentially poisoned) messages to real Anthropic API. console.log('Turn 2: round-trip to Anthropic'); try { const result2 = await generateText({ model: anthropic('claude-sonnet-4-20250514'), messages: [ { role: 'user', content: 'What is the weather in San Francisco?' }, ...result1.response.messages, ], tools: { weather: tool({ inputSchema: z.object({ city: z.string() }), execute: async ({ city }) => `Sunny in ${city}`, }), }, stopWhen: isStepCount(4), }); console.log(`Anthropic responded: "${result2.text.slice(0, 200)}"`); console.log( '\nRequest body:', JSON.stringify(result2.request.body, null, 2), ); console.log( '\nResponse body:', JSON.stringify(result2.response, null, 2), ); } catch (error: any) { console.error('Anthropic rejected the request!'); console.error(` Status: ${error.statusCode ?? 'unknown'}`); console.error(` Message: ${JSON.stringify(error, null, 2)}`); } }); ``` </details> before: we get an API error `Input should be a valid dictionary` after: model response with weather ## Checklist - [x] Tests have been added / updated (for bug fixes / features) - [ ] Documentation has been added / updated (for bug fixes / features) - [x] A _patch_ changeset for relevant packages has been added (for bug fixes / features - run `pnpm changeset` in the project root) - [x] I have reviewed this pull request (self-review) ## Related Issues fixes #13892
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ `main` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `main`.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ # Releases ## ai@7.0.0-beta.77 ### Patch Changes - 2add429: fix(ai): skip passing invalid JSON inputs to response messages ## @ai-sdk/angular@3.0.0-beta.77 ### Patch Changes - Updated dependencies [2add429] - ai@7.0.0-beta.77 ## @ai-sdk/langchain@3.0.0-beta.77 ### Patch Changes - Updated dependencies [2add429] - ai@7.0.0-beta.77 ## @ai-sdk/llamaindex@3.0.0-beta.77 ### Patch Changes - Updated dependencies [2add429] - ai@7.0.0-beta.77 ## @ai-sdk/otel@1.0.0-beta.23 ### Patch Changes - Updated dependencies [2add429] - ai@7.0.0-beta.77 ## @ai-sdk/react@4.0.0-beta.77 ### Patch Changes - Updated dependencies [2add429] - ai@7.0.0-beta.77 ## @ai-sdk/rsc@3.0.0-beta.78 ### Patch Changes - Updated dependencies [2add429] - ai@7.0.0-beta.77 ## @ai-sdk/svelte@5.0.0-beta.77 ### Patch Changes - Updated dependencies [2add429] - ai@7.0.0-beta.77 ## @ai-sdk/vue@4.0.0-beta.77 ### Patch Changes - Updated dependencies [2add429] - ai@7.0.0-beta.77 Co-authored-by: vercel-ai-sdk[bot] <225926702+vercel-ai-sdk[bot]@users.noreply.github.com>
## Background Adding ZeroEntropy to the list of community providers on the documentation. ## Summary Updated the documentation to reflect ZeroEntropy's availability. ## Checklist - [ ] Tests have been added / updated (for bug fixes / features) - [ ] Documentation has been added / updated (for bug fixes / features) - [ ] A _patch_ changeset for relevant packages has been added (for bug fixes / features - run `pnpm changeset` in the project root) - [x] I have reviewed this pull request (self-review)
…ge model twice (#14289) ## Background When a UI message history contains an approved `providerExecuted` tool invocation and the server does the standard pattern: ```ts const modelMessages = await convertToModelMessages(messages); return streamText({ model, messages: modelMessages }); ``` the provider receives the same `tool-approval-response` **twice** for the same `approvalId` in one tool message. This can cause downstream providers to reject the prompt as invalid (one approval request must produce exactly one response). ## Summary `collectToolApprovals` finds approval responses by reading the last tool message of `initialMessages`. Those responses are already present in `initialMessages` because `convertToModelMessages` placed them there. Both `generateText` and `streamText` then redundantly pushed the same responses into `responseMessages`/`initialResponseMessages`. When the step computed `stepInputMessages = [...initialMessages, ...responseMessages]`, the approval appeared twice, and `convertToLanguageModelPrompt` surfaced both copies inside a single merged tool message. - Removed the redundant `providerExecutedToolApprovals` push in `generateText` - Removed the same block in `streamText` - Updated the four existing snapshots that already documented the bug (approved + denied cases for each function) ## Manual Verification In `examples/ai-e2e-next`, navigate to `/chat/test-openai-responses-mcp-approval` and send `"Shorten the link https://ai-sdk.dev/"`. After approving the MCP tool call, the conversation should complete successfully. To compare before/after, add a `console.log` of the prompt passed to the model in the mock or in the route handler. In `generateText`/`streamText`, you can log `stepInputMessages` (the variable at the top of the `do` loop / `streamStep` body) immediately before the language model call and confirm the tool message contains exactly one `tool-approval-response` entry after the fix. ## Checklist - [x] Tests have been added / updated (for bug fixes / features) - [ ] Documentation has been added / updated (for bug fixes / features) - [x] A _patch_ changeset for relevant packages has been added (for bug fixes / features - run `pnpm changeset` in the project root) - [x] I have reviewed this pull request (self-review)
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ `main` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `main`.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ # Releases ## ai@7.0.0-beta.78 ### Patch Changes - f372547: fix(ai): fix `providerExecuted` tool approvals being passed to language model twice - Updated dependencies [7943a4b] - @ai-sdk/gateway@4.0.0-beta.44 ## @ai-sdk/angular@3.0.0-beta.78 ### Patch Changes - Updated dependencies [f372547] - ai@7.0.0-beta.78 ## @ai-sdk/gateway@4.0.0-beta.44 ### Patch Changes - 7943a4b: chore(provider/gateway): update gateway model settings files ## @ai-sdk/langchain@3.0.0-beta.78 ### Patch Changes - Updated dependencies [f372547] - ai@7.0.0-beta.78 ## @ai-sdk/llamaindex@3.0.0-beta.78 ### Patch Changes - Updated dependencies [f372547] - ai@7.0.0-beta.78 ## @ai-sdk/otel@1.0.0-beta.24 ### Patch Changes - Updated dependencies [f372547] - ai@7.0.0-beta.78 ## @ai-sdk/react@4.0.0-beta.78 ### Patch Changes - Updated dependencies [f372547] - ai@7.0.0-beta.78 ## @ai-sdk/rsc@3.0.0-beta.79 ### Patch Changes - Updated dependencies [f372547] - ai@7.0.0-beta.78 ## @ai-sdk/svelte@5.0.0-beta.78 ### Patch Changes - Updated dependencies [f372547] - ai@7.0.0-beta.78 ## @ai-sdk/vue@4.0.0-beta.78 ### Patch Changes - Updated dependencies [f372547] - ai@7.0.0-beta.78 Co-authored-by: vercel-ai-sdk[bot] <225926702+vercel-ai-sdk[bot]@users.noreply.github.com>
## Background introduced in #13825 we used to capture the `serverInfo` in the schema but never surface it through to the client. only `result.capabilities` was stored and `result.serverInfo` was thrown away. there was no field on the client to hold it and no property on the MCPClient interface to access it ## Summary - added `title` field to `ClientOrServerImplementationSchema` to align with [MCP spec](https://modelcontextprotocol.io/specification/2025-11-25/schema#implementation) - exposed `serverInfo` via a getter function ## Manual Verification verified by running the client and server under `examples/mcp/src/server-info` ## Checklist - [x] Tests have been added / updated (for bug fixes / features) - [ ] Documentation has been added / updated (for bug fixes / features) - [x] A _patch_ changeset for relevant packages has been added (for bug fixes / features - run `pnpm changeset` in the project root) - [x] I have reviewed this pull request (self-review)
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ `main` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `main`.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ # Releases ## @ai-sdk/mcp@2.0.0-beta.23 ### Patch Changes - a98bf66: feat(mcp): surface 'serverInfo' exposed from the MCP server Co-authored-by: vercel-ai-sdk[bot] <225926702+vercel-ai-sdk[bot]@users.noreply.github.com>
## Background Event listener composites were created in several places, with different implementations. ## Summary * extract `mergeListeners` util * change implementation to parallel execution * add unit tests * add jsdoc ## Related Issues * needed for #12165
… no longer ignore `providerExecuted` tool approvals (#14323) ## Summary `lastAssistantMessageIsCompleteWithApprovalResponses()` so far ignores `providerExecuted` tools. There's no good reason for that, and we already had to work around it in one of the Next.js E2E examples. This PR removes the condition so that `providerExecuted` tools are also considered. ## Manual Verification run the modified example, where the custom workaround helper was replaced with the function from `ai` ## Checklist - [x] Tests have been added / updated (for bug fixes / features) - [ ] Documentation has been added / updated (for bug fixes / features) - [x] A _patch_ changeset for relevant packages has been added (for bug fixes / features - run `pnpm changeset` in the project root) - [x] I have reviewed this pull request (self-review) ## Related Issues includes a follow-up cleanup of an unused variable from #14289 (which for some reason wasn't flagged by CI in that PR)
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ `main` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `main`.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ # Releases ## ai@7.0.0-beta.79 ### Patch Changes - 6866afe: fix(ai): fix `lastAssistantMessageIsCompleteWithApprovalResponses` to no longer ignore `providerExecuted` tool approvals ## @ai-sdk/angular@3.0.0-beta.79 ### Patch Changes - Updated dependencies [6866afe] - ai@7.0.0-beta.79 ## @ai-sdk/langchain@3.0.0-beta.79 ### Patch Changes - Updated dependencies [6866afe] - ai@7.0.0-beta.79 ## @ai-sdk/llamaindex@3.0.0-beta.79 ### Patch Changes - Updated dependencies [6866afe] - ai@7.0.0-beta.79 ## @ai-sdk/otel@1.0.0-beta.25 ### Patch Changes - Updated dependencies [6866afe] - ai@7.0.0-beta.79 ## @ai-sdk/react@4.0.0-beta.79 ### Patch Changes - Updated dependencies [6866afe] - ai@7.0.0-beta.79 ## @ai-sdk/rsc@3.0.0-beta.80 ### Patch Changes - Updated dependencies [6866afe] - ai@7.0.0-beta.79 ## @ai-sdk/svelte@5.0.0-beta.79 ### Patch Changes - Updated dependencies [6866afe] - ai@7.0.0-beta.79 ## @ai-sdk/vue@4.0.0-beta.79 ### Patch Changes - Updated dependencies [6866afe] - ai@7.0.0-beta.79 Co-authored-by: vercel-ai-sdk[bot] <225926702+vercel-ai-sdk[bot]@users.noreply.github.com>
## Background Generic context was introduced in #13102 . However, the type inference for the `context` property was not requiring it to be available (no type error was shown when context was not specified). ## Summary * switch from `GenerationContext` approach to separate `USER_CONTEXT` * change context type on `Tool` * update related code ## Manual Verification - [x] check types and remove/experiment with type errors in `examples/ai-functions/src/generate-text/openai/tool-call-with-context.ts` - [x] check types and remove/experiment with type errors in `examples/ai-functions/src/stream-text/openai/tool-call-with-context.ts` - [x] check types and remove/experiment with type errors in `examples/ai-functions/src/agent/openai/generate-context.ts` ## Related Issues Addresses limitation from #13102
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ `main` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `main`.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ # Releases ## ai@7.0.0-beta.80 ### Patch Changes - 3ae1786: fix: better context type inference - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 - @ai-sdk/gateway@4.0.0-beta.45 ## @ai-sdk/alibaba@2.0.0-beta.24 ### Patch Changes - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 - @ai-sdk/openai-compatible@3.0.0-beta.22 ## @ai-sdk/amazon-bedrock@5.0.0-beta.28 ### Patch Changes - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 - @ai-sdk/anthropic@4.0.0-beta.24 ## @ai-sdk/angular@3.0.0-beta.80 ### Patch Changes - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 - ai@7.0.0-beta.80 ## @ai-sdk/anthropic@4.0.0-beta.24 ### Patch Changes - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 ## @ai-sdk/assemblyai@3.0.0-beta.19 ### Patch Changes - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 ## @ai-sdk/azure@4.0.0-beta.28 ### Patch Changes - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 - @ai-sdk/openai@4.0.0-beta.28 ## @ai-sdk/baseten@2.0.0-beta.22 ### Patch Changes - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 - @ai-sdk/openai-compatible@3.0.0-beta.22 ## @ai-sdk/black-forest-labs@2.0.0-beta.18 ### Patch Changes - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 ## @ai-sdk/bytedance@2.0.0-beta.18 ### Patch Changes - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 ## @ai-sdk/cerebras@3.0.0-beta.22 ### Patch Changes - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 - @ai-sdk/openai-compatible@3.0.0-beta.22 ## @ai-sdk/cohere@4.0.0-beta.19 ### Patch Changes - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 ## @ai-sdk/deepgram@3.0.0-beta.18 ### Patch Changes - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 ## @ai-sdk/deepinfra@3.0.0-beta.22 ### Patch Changes - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 - @ai-sdk/openai-compatible@3.0.0-beta.22 ## @ai-sdk/deepseek@3.0.0-beta.20 ### Patch Changes - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 ## @ai-sdk/elevenlabs@3.0.0-beta.18 ### Patch Changes - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 ## @ai-sdk/fal@3.0.0-beta.18 ### Patch Changes - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 ## @ai-sdk/fireworks@3.0.0-beta.22 ### Patch Changes - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 - @ai-sdk/openai-compatible@3.0.0-beta.22 ## @ai-sdk/gateway@4.0.0-beta.45 ### Patch Changes - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 ## @ai-sdk/gladia@3.0.0-beta.18 ### Patch Changes - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 ## @ai-sdk/google@4.0.0-beta.33 ### Patch Changes - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 ## @ai-sdk/google-vertex@5.0.0-beta.42 ### Patch Changes - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 - @ai-sdk/anthropic@4.0.0-beta.24 - @ai-sdk/google@4.0.0-beta.33 - @ai-sdk/openai-compatible@3.0.0-beta.22 ## @ai-sdk/groq@4.0.0-beta.21 ### Patch Changes - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 ## @ai-sdk/huggingface@2.0.0-beta.22 ### Patch Changes - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 - @ai-sdk/openai-compatible@3.0.0-beta.22 ## @ai-sdk/hume@3.0.0-beta.18 ### Patch Changes - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 ## @ai-sdk/klingai@4.0.0-beta.19 ### Patch Changes - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 ## @ai-sdk/langchain@3.0.0-beta.80 ### Patch Changes - Updated dependencies [3ae1786] - ai@7.0.0-beta.80 ## @ai-sdk/llamaindex@3.0.0-beta.80 ### Patch Changes - Updated dependencies [3ae1786] - ai@7.0.0-beta.80 ## @ai-sdk/lmnt@3.0.0-beta.18 ### Patch Changes - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 ## @ai-sdk/luma@3.0.0-beta.18 ### Patch Changes - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 ## @ai-sdk/mcp@2.0.0-beta.24 ### Patch Changes - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 ## @ai-sdk/mistral@4.0.0-beta.20 ### Patch Changes - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 ## @ai-sdk/moonshotai@3.0.0-beta.22 ### Patch Changes - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 - @ai-sdk/openai-compatible@3.0.0-beta.22 ## @ai-sdk/open-responses@2.0.0-beta.20 ### Patch Changes - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 ## @ai-sdk/openai@4.0.0-beta.28 ### Patch Changes - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 ## @ai-sdk/openai-compatible@3.0.0-beta.22 ### Patch Changes - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 ## @ai-sdk/otel@1.0.0-beta.26 ### Patch Changes - Updated dependencies [3ae1786] - ai@7.0.0-beta.80 ## @ai-sdk/perplexity@4.0.0-beta.21 ### Patch Changes - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 ## @ai-sdk/prodia@2.0.0-beta.21 ### Patch Changes - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 ## @ai-sdk/provider-utils@5.0.0-beta.17 ### Patch Changes - 3ae1786: fix: better context type inference ## @ai-sdk/react@4.0.0-beta.80 ### Patch Changes - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 - ai@7.0.0-beta.80 ## @ai-sdk/replicate@3.0.0-beta.19 ### Patch Changes - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 ## @ai-sdk/revai@3.0.0-beta.19 ### Patch Changes - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 ## @ai-sdk/rsc@3.0.0-beta.81 ### Patch Changes - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 - ai@7.0.0-beta.80 ## @ai-sdk/svelte@5.0.0-beta.80 ### Patch Changes - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 - ai@7.0.0-beta.80 ## @ai-sdk/togetherai@3.0.0-beta.22 ### Patch Changes - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 - @ai-sdk/openai-compatible@3.0.0-beta.22 ## @ai-sdk/valibot@3.0.0-beta.17 ### Patch Changes - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 ## @ai-sdk/vercel@3.0.0-beta.22 ### Patch Changes - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 - @ai-sdk/openai-compatible@3.0.0-beta.22 ## @ai-sdk/vue@4.0.0-beta.80 ### Patch Changes - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 - ai@7.0.0-beta.80 ## @ai-sdk/xai@4.0.0-beta.33 ### Patch Changes - Updated dependencies [3ae1786] - @ai-sdk/provider-utils@5.0.0-beta.17 - @ai-sdk/openai-compatible@3.0.0-beta.22 Co-authored-by: vercel-ai-sdk[bot] <225926702+vercel-ai-sdk[bot]@users.noreply.github.com>
## Background added as work for #14207 when using the streaming functions and logging telemetry via devtools, the raw chunks couldn't be seen in the viewer. and that's because the event types weren't being passed through callbacks ## Summary dispatch content chunk types through the global onChunk so that telemetry integrations receive the full stream. ## Manual Verification verified as a part of #14207 ## Checklist - [x] Tests have been added / updated (for bug fixes / features) - [ ] Documentation has been added / updated (for bug fixes / features) - [x] A _patch_ changeset for relevant packages has been added (for bug fixes / features - run `pnpm changeset` in the project root) - [x] I have reviewed this pull request (self-review)
…pport file and skill upload abstractions (#14284) ## Background `customProvider` and `createProviderRegistry` had gaps in provider capability coverage: `customProvider` had no way to attach a provider's `files` or `skills` interfaces, `createProviderRegistry` was missing `videoModel` support entirely, and neither exposed `files`/`skills` access through the registry abstraction. This made it impossible to use file and skill upload APIs consistently through these provider management utilities. ## Summary - **`customProvider`**: Added `files` and `skills` options. - **`createProviderRegistry`**: Added `videoModel(providerId:modelId)`, `files(providerId)`, and `skills(providerId)` methods. - Updated provider management docs with examples for all new APIs. - Added 6 new `ai-functions` examples. - Simplified the `ai-e2e-next` upload-file route to use `createProviderRegistry` instead of a hand-rolled provider map. Fully backward compatible. ## Manual Verification Run the new examples. ## Checklist - [x] Tests have been added / updated (for bug fixes / features) - [x] Documentation has been added / updated (for bug fixes / features) - [x] A _patch_ changeset for relevant packages has been added (for bug fixes / features - run `pnpm changeset` in the project root) - [x] I have reviewed this pull request (self-review) ## Future Work N/A ## Related Issues N/A
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ `main` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `main`.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ # Releases ## ai@7.0.0-beta.81 ### Patch Changes - 2fe1099: feat(ai): emit streaming chunks throught the onChunk callback - f04adcb: feat(ai): refresh `customProvider` and `createProviderRegistry` to support file and skill upload abstractions ## @ai-sdk/angular@3.0.0-beta.81 ### Patch Changes - Updated dependencies [2fe1099] - Updated dependencies [f04adcb] - ai@7.0.0-beta.81 ## @ai-sdk/langchain@3.0.0-beta.81 ### Patch Changes - Updated dependencies [2fe1099] - Updated dependencies [f04adcb] - ai@7.0.0-beta.81 ## @ai-sdk/llamaindex@3.0.0-beta.81 ### Patch Changes - Updated dependencies [2fe1099] - Updated dependencies [f04adcb] - ai@7.0.0-beta.81 ## @ai-sdk/otel@1.0.0-beta.27 ### Patch Changes - Updated dependencies [2fe1099] - Updated dependencies [f04adcb] - ai@7.0.0-beta.81 ## @ai-sdk/react@4.0.0-beta.81 ### Patch Changes - Updated dependencies [2fe1099] - Updated dependencies [f04adcb] - ai@7.0.0-beta.81 ## @ai-sdk/rsc@3.0.0-beta.82 ### Patch Changes - Updated dependencies [2fe1099] - Updated dependencies [f04adcb] - ai@7.0.0-beta.81 ## @ai-sdk/svelte@5.0.0-beta.81 ### Patch Changes - Updated dependencies [2fe1099] - Updated dependencies [f04adcb] - ai@7.0.0-beta.81 ## @ai-sdk/vue@4.0.0-beta.81 ### Patch Changes - Updated dependencies [2fe1099] - Updated dependencies [f04adcb] - ai@7.0.0-beta.81 Co-authored-by: vercel-ai-sdk[bot] <225926702+vercel-ai-sdk[bot]@users.noreply.github.com>
## Background our devtools setup currently uses middleware to extract event info this needed to change since we now expose all the events that will be needed by devtools to initialise the spans replacement for #12868 ## Summary - create new `devToolsIntegration()` that extends on the telemetry integration api - add a trace/span viewer that properly maps each step ## Manual Verification verified by running the example `examples/ai-functions/src/generate-text/anthropic/subagent-with-telemetry.ts` ## Checklist - [x] Tests have been added / updated (for bug fixes / features) - [ ] Documentation has been added / updated (for bug fixes / features) - [x] A _patch_ changeset for relevant packages has been added (for bug fixes / features - run `pnpm changeset` in the project root) - [ ] I have reviewed this pull request (self-review)
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ `main` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `main`.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ # Releases ## ai@7.0.0-beta.82 ### Patch Changes - e27ed76: feat(devtools): add new devtools integration for telemetry ## @ai-sdk/angular@3.0.0-beta.82 ### Patch Changes - Updated dependencies [e27ed76] - ai@7.0.0-beta.82 ## @ai-sdk/devtools@1.0.0-beta.11 ### Patch Changes - e27ed76: feat(devtools): add new devtools integration for telemetry ## @ai-sdk/langchain@3.0.0-beta.82 ### Patch Changes - Updated dependencies [e27ed76] - ai@7.0.0-beta.82 ## @ai-sdk/llamaindex@3.0.0-beta.82 ### Patch Changes - Updated dependencies [e27ed76] - ai@7.0.0-beta.82 ## @ai-sdk/otel@1.0.0-beta.28 ### Patch Changes - Updated dependencies [e27ed76] - ai@7.0.0-beta.82 ## @ai-sdk/react@4.0.0-beta.82 ### Patch Changes - Updated dependencies [e27ed76] - ai@7.0.0-beta.82 ## @ai-sdk/rsc@3.0.0-beta.83 ### Patch Changes - Updated dependencies [e27ed76] - ai@7.0.0-beta.82 ## @ai-sdk/svelte@5.0.0-beta.82 ### Patch Changes - Updated dependencies [e27ed76] - ai@7.0.0-beta.82 ## @ai-sdk/vue@4.0.0-beta.82 ### Patch Changes - Updated dependencies [e27ed76] - ai@7.0.0-beta.82 Co-authored-by: vercel-ai-sdk[bot] <225926702+vercel-ai-sdk[bot]@users.noreply.github.com>
## Background The AI Gateway provider needed the ability to sort providers by performance and cost metrics to optimize routing decisions based on specific criteria like cost efficiency, response speed, or throughput. ## Changes Added a new `sort` option to the AI Gateway provider that allows sorting providers by: - `'cost'` - lowest input cost per token first - `'ttft'` - lowest time-to-first-token first - `'tps'` - highest tokens-per-second first When specified, the gateway tries the best-scoring provider first and falls back through the rest in sorted order. When combined with the existing `order` option, user-specified providers are promoted to the front while remaining providers follow the sorted order. ## Manual Verification ## Checklist - [ ] Tests have been added / updated (for bug fixes / features) - [x] Documentation has been added / updated (for bug fixes / features) - [x] A _patch_ changeset for relevant packages has been added (for bug fixes / features - run `pnpm changeset` in the project root) - [x] I have reviewed this pull request (self-review)
…ion (#14339) ## Background Anthropic supports data residency controls through an `inference_geo` parameter that allows developers to specify where model inference should run for compliance and data governance requirements. See https://platform.claude.com/docs/en/build-with-claude/data-residency ## Changes Added support for the `inferenceGeo` provider option to the Anthropic provider, allowing users to control where model inference runs by specifying either `'us'` (US-only infrastructure) or `'global'` (any available geography, default). The implementation includes: - New `inferenceGeo` option in `AnthropicLanguageModelOptions` with proper validation - Request body mapping to Anthropic's `inference_geo` parameter - Documentation with usage examples - Test coverage for the new functionality - Example implementation demonstrating the feature ## Manual Verification Tested the feature by running the provided example with `inferenceGeo: 'us'` and verified that the parameter is correctly passed to Anthropic's API in the request body as `inference_geo`. ## Checklist - [x] Tests have been added / updated (for bug fixes / features) - [x] Documentation has been added / updated (for bug fixes / features) - [x] A _patch_ changeset for relevant packages has been added (for bug fixes / features - run `pnpm changeset` in the project root) - [x] I have reviewed this pull request (self-review)
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ `main` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `main`.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ # Releases ## ai@7.0.0-beta.83 ### Patch Changes - Updated dependencies [6b0a40d] - @ai-sdk/gateway@4.0.0-beta.46 ## @ai-sdk/amazon-bedrock@5.0.0-beta.29 ### Patch Changes - Updated dependencies [09bd27b] - @ai-sdk/anthropic@4.0.0-beta.25 ## @ai-sdk/angular@3.0.0-beta.83 ### Patch Changes - ai@7.0.0-beta.83 ## @ai-sdk/anthropic@4.0.0-beta.25 ### Patch Changes - 09bd27b: feat (provider/anthropic): add support for inference_geo provider option ## @ai-sdk/gateway@4.0.0-beta.46 ### Patch Changes - 6b0a40d: feat (provider/gateway): add sort options ## @ai-sdk/google-vertex@5.0.0-beta.43 ### Patch Changes - Updated dependencies [09bd27b] - @ai-sdk/anthropic@4.0.0-beta.25 ## @ai-sdk/langchain@3.0.0-beta.83 ### Patch Changes - ai@7.0.0-beta.83 ## @ai-sdk/llamaindex@3.0.0-beta.83 ### Patch Changes - ai@7.0.0-beta.83 ## @ai-sdk/otel@1.0.0-beta.29 ### Patch Changes - ai@7.0.0-beta.83 ## @ai-sdk/react@4.0.0-beta.83 ### Patch Changes - ai@7.0.0-beta.83 ## @ai-sdk/rsc@3.0.0-beta.84 ### Patch Changes - ai@7.0.0-beta.83 ## @ai-sdk/svelte@5.0.0-beta.83 ### Patch Changes - ai@7.0.0-beta.83 ## @ai-sdk/vue@4.0.0-beta.83 ### Patch Changes - ai@7.0.0-beta.83 Co-authored-by: vercel-ai-sdk[bot] <225926702+vercel-ai-sdk[bot]@users.noreply.github.com>
… doGenerate (#14352) ## Background #14314 introduced in #13929, we added support for streaming tool call arguments for the vertex provider. but the check for passing that parameter seeped through for doGenerate as well, producing an API error (the generate endpoint rejects that option) ## Summary - add a check to only pass `streamFunctionCallArguments` for doStream ## Manual Verification verified by running the example `examples/ai-functions/src/generate-text/google/vertex-grounding.ts` before and after the fix. before, it gave the api error. after: it resolves and produces an answer ## Checklist - [x] Tests have been added / updated (for bug fixes / features) - [x] Documentation has been added / updated (for bug fixes / features) - [x] A _patch_ changeset for relevant packages has been added (for bug fixes / features - run `pnpm changeset` in the project root) - [x] I have reviewed this pull request (self-review) ## Related Issues fixes #14314
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ `main` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `main`.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ # Releases ## @ai-sdk/google@4.0.0-beta.34 ### Patch Changes - 5b7e7c2: fix(google-vertex): don't send streamFunctionCallArguments for unary API calls and change default to false ## @ai-sdk/google-vertex@5.0.0-beta.44 ### Patch Changes - Updated dependencies [5b7e7c2] - @ai-sdk/google@4.0.0-beta.34 Co-authored-by: vercel-ai-sdk[bot] <225926702+vercel-ai-sdk[bot]@users.noreply.github.com>
## Summary we have a ton of unused variables in our codebase. For some reason, the lint rules to flag these were disabled. This PR fixes only the violations flagged by `oxlint` - it's already a bunch. We can open another PR for the TypeScript flagged problems. `oxlint` finds many false positives in tests, and since this is less important for tests anyway, we can just disable the rule for test files. To reduce the scope, we still ignore those errors in `examples/` for now - also because some of the unused variables in `examples` are intentionally there. ## Checklist - [ ] Tests have been added / updated (for bug fixes / features) - [ ] Documentation has been added / updated (for bug fixes / features) - [x] A _patch_ changeset for relevant packages has been added (for bug fixes / features - run `pnpm changeset` in the project root) - [x] I have reviewed this pull request (self-review)
…OpenTelemetry spans (#14800) ## Background we will most likely be deprecating the `LegacyOpenTelemetry` class. but for users that still need AI SDK specific attributes (not spans), we should consider adding an opt-in option that will allow users to log those attributes this is for information that is not already conveyed through gen_ai spans/attributes ## Summary emit LegacyOpenTelemetry `ai_*` attributes in OpenTelemetry when users want to opt in ```ts registerTelemetry( new OpenTelemetry({ usage: true, providerMetadata: true, runtimeContext: true, }), ); ``` ## Manual Verification verified by running the examples: - `examples/ai-functions/src/generate-text/anthropic/subagent-with-telemetry.ts` - `examples/ai-functions/src/telemetry/otel/generate-text-tool-call.ts` ## Checklist - [x] All commits are signed (PRs with unsigned commits cannot be merged) - [x] Tests have been added / updated (for bug fixes / features) - [ ] Documentation has been added / updated (for bug fixes / features) - [x] A _patch_ changeset for relevant packages has been added (for bug fixes / features - run `pnpm changeset` in the project root) - [x] I have reviewed this pull request (self-review)
## Background code snippet was highlighted incorrectly
## Background Different types of tools can have different available options. Currently we expose options on tool types that do not support it, e.g. execute on provider executed tools. ## Summary Refactor the `Tool` type into a union of `FunctionTool`, `DynamicTool`, `ProviderDefinedTool`, and `ProviderExecutedTool`. Expose the new types. Add type tests. The goal is to create a foundation for further refactoring and option restrictions. ## Future Work * restrict options available on specific tool types more
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ `main` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `main`.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ # Releases ## ai@7.0.0-beta.114 ### Major Changes - 1f7db50: fix(ai): remove experimental_customProvider - 9bd6512: feat(provider): change file part data property to be tagged with a type and remove the image part type ### Patch Changes - 43a6750: fix(ai): preserve `allowSystemInMessages` across `streamText` retries - 81caa5d: fix(ai): remove ExtractLiteralUnion export - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - 6147cdf: fix(ai): fix auto-complete on provider registry and custom provider - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - @ai-sdk/provider-utils@5.0.0-beta.29 - @ai-sdk/provider@4.0.0-beta.14 - @ai-sdk/gateway@4.0.0-beta.65 ## @ai-sdk/provider@4.0.0-beta.14 ### Major Changes - 9bd6512: feat(provider): change file part data property to be tagged with a type and remove the image part type ### Patch Changes - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles ## @ai-sdk/alibaba@2.0.0-beta.36 ### Patch Changes - 9bd6512: feat(provider): change file part data property to be tagged with a type and remove the image part type - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - @ai-sdk/openai-compatible@3.0.0-beta.34 - @ai-sdk/provider-utils@5.0.0-beta.29 - @ai-sdk/provider@4.0.0-beta.14 ## @ai-sdk/amazon-bedrock@5.0.0-beta.45 ### Patch Changes - 6732c16: fix(amazon-bedrock): do not use env var AWS_SESSION_TOKEN when keys are explicitly defined - 9bd6512: feat(provider): change file part data property to be tagged with a type and remove the image part type - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - @ai-sdk/provider-utils@5.0.0-beta.29 - @ai-sdk/anthropic@4.0.0-beta.41 - @ai-sdk/provider@4.0.0-beta.14 ## @ai-sdk/angular@3.0.0-beta.114 ### Patch Changes - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [43a6750] - Updated dependencies [81caa5d] - Updated dependencies [1f7db50] - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - Updated dependencies [6147cdf] - ai@7.0.0-beta.114 - @ai-sdk/provider-utils@5.0.0-beta.29 ## @ai-sdk/anthropic@4.0.0-beta.41 ### Patch Changes - 9bd6512: feat(provider): change file part data property to be tagged with a type and remove the image part type - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - @ai-sdk/provider-utils@5.0.0-beta.29 - @ai-sdk/provider@4.0.0-beta.14 ## @ai-sdk/assemblyai@3.0.0-beta.31 ### Patch Changes - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - @ai-sdk/provider-utils@5.0.0-beta.29 - @ai-sdk/provider@4.0.0-beta.14 ## @ai-sdk/azure@4.0.0-beta.41 ### Patch Changes - 9bd6512: feat(provider): change file part data property to be tagged with a type and remove the image part type - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - @ai-sdk/provider-utils@5.0.0-beta.29 - @ai-sdk/provider@4.0.0-beta.14 - @ai-sdk/openai@4.0.0-beta.41 ## @ai-sdk/baseten@2.0.0-beta.34 ### Patch Changes - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - @ai-sdk/openai-compatible@3.0.0-beta.34 - @ai-sdk/provider-utils@5.0.0-beta.29 - @ai-sdk/provider@4.0.0-beta.14 ## @ai-sdk/black-forest-labs@2.0.0-beta.30 ### Patch Changes - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - @ai-sdk/provider-utils@5.0.0-beta.29 - @ai-sdk/provider@4.0.0-beta.14 ## @ai-sdk/bytedance@2.0.0-beta.31 ### Patch Changes - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - @ai-sdk/provider-utils@5.0.0-beta.29 - @ai-sdk/provider@4.0.0-beta.14 ## @ai-sdk/cerebras@3.0.0-beta.34 ### Patch Changes - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - @ai-sdk/openai-compatible@3.0.0-beta.34 - @ai-sdk/provider-utils@5.0.0-beta.29 - @ai-sdk/provider@4.0.0-beta.14 ## @ai-sdk/codemod@4.0.0-beta.4 ### Patch Changes - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles ## @ai-sdk/cohere@4.0.0-beta.31 ### Patch Changes - 9bd6512: feat(provider): change file part data property to be tagged with a type and remove the image part type - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - @ai-sdk/provider-utils@5.0.0-beta.29 - @ai-sdk/provider@4.0.0-beta.14 ## @ai-sdk/deepgram@3.0.0-beta.30 ### Patch Changes - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - @ai-sdk/provider-utils@5.0.0-beta.29 - @ai-sdk/provider@4.0.0-beta.14 ## @ai-sdk/deepinfra@3.0.0-beta.34 ### Patch Changes - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - @ai-sdk/openai-compatible@3.0.0-beta.34 - @ai-sdk/provider-utils@5.0.0-beta.29 - @ai-sdk/provider@4.0.0-beta.14 ## @ai-sdk/deepseek@3.0.0-beta.32 ### Patch Changes - 9bd6512: feat(provider): change file part data property to be tagged with a type and remove the image part type - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - @ai-sdk/provider-utils@5.0.0-beta.29 - @ai-sdk/provider@4.0.0-beta.14 ## @ai-sdk/devtools@1.0.0-beta.19 ### Patch Changes - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [9bd6512] - Updated dependencies [258c093] - @ai-sdk/provider@4.0.0-beta.14 ## @ai-sdk/elevenlabs@3.0.0-beta.30 ### Patch Changes - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - @ai-sdk/provider-utils@5.0.0-beta.29 - @ai-sdk/provider@4.0.0-beta.14 ## @ai-sdk/fal@3.0.0-beta.30 ### Patch Changes - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - @ai-sdk/provider-utils@5.0.0-beta.29 - @ai-sdk/provider@4.0.0-beta.14 ## @ai-sdk/fireworks@3.0.0-beta.34 ### Patch Changes - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - @ai-sdk/openai-compatible@3.0.0-beta.34 - @ai-sdk/provider-utils@5.0.0-beta.29 - @ai-sdk/provider@4.0.0-beta.14 ## @ai-sdk/gateway@4.0.0-beta.65 ### Patch Changes - 9bd6512: feat(provider): change file part data property to be tagged with a type and remove the image part type - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - @ai-sdk/provider-utils@5.0.0-beta.29 - @ai-sdk/provider@4.0.0-beta.14 ## @ai-sdk/gladia@3.0.0-beta.30 ### Patch Changes - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - @ai-sdk/provider-utils@5.0.0-beta.29 - @ai-sdk/provider@4.0.0-beta.14 ## @ai-sdk/google@4.0.0-beta.48 ### Patch Changes - 9bd6512: feat(provider): change file part data property to be tagged with a type and remove the image part type - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - @ai-sdk/provider-utils@5.0.0-beta.29 - @ai-sdk/provider@4.0.0-beta.14 ## @ai-sdk/google-vertex@5.0.0-beta.62 ### Patch Changes - 9bd6512: feat(provider): change file part data property to be tagged with a type and remove the image part type - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - @ai-sdk/openai-compatible@3.0.0-beta.34 - @ai-sdk/provider-utils@5.0.0-beta.29 - @ai-sdk/anthropic@4.0.0-beta.41 - @ai-sdk/provider@4.0.0-beta.14 - @ai-sdk/google@4.0.0-beta.48 ## @ai-sdk/groq@4.0.0-beta.33 ### Patch Changes - 9bd6512: feat(provider): change file part data property to be tagged with a type and remove the image part type - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - @ai-sdk/provider-utils@5.0.0-beta.29 - @ai-sdk/provider@4.0.0-beta.14 ## @ai-sdk/huggingface@2.0.0-beta.34 ### Patch Changes - 9bd6512: feat(provider): change file part data property to be tagged with a type and remove the image part type - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - @ai-sdk/openai-compatible@3.0.0-beta.34 - @ai-sdk/provider-utils@5.0.0-beta.29 - @ai-sdk/provider@4.0.0-beta.14 ## @ai-sdk/hume@3.0.0-beta.30 ### Patch Changes - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - @ai-sdk/provider-utils@5.0.0-beta.29 - @ai-sdk/provider@4.0.0-beta.14 ## @ai-sdk/klingai@4.0.0-beta.31 ### Patch Changes - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - @ai-sdk/provider-utils@5.0.0-beta.29 - @ai-sdk/provider@4.0.0-beta.14 ## @ai-sdk/langchain@3.0.0-beta.114 ### Patch Changes - 9bd6512: feat(provider): change file part data property to be tagged with a type and remove the image part type - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [43a6750] - Updated dependencies [81caa5d] - Updated dependencies [1f7db50] - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [6147cdf] - ai@7.0.0-beta.114 ## @ai-sdk/llamaindex@3.0.0-beta.114 ### Patch Changes - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [43a6750] - Updated dependencies [81caa5d] - Updated dependencies [1f7db50] - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [6147cdf] - ai@7.0.0-beta.114 ## @ai-sdk/lmnt@3.0.0-beta.30 ### Patch Changes - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - @ai-sdk/provider-utils@5.0.0-beta.29 - @ai-sdk/provider@4.0.0-beta.14 ## @ai-sdk/luma@3.0.0-beta.30 ### Patch Changes - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - @ai-sdk/provider-utils@5.0.0-beta.29 - @ai-sdk/provider@4.0.0-beta.14 ## @ai-sdk/mcp@2.0.0-beta.36 ### Patch Changes - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - @ai-sdk/provider-utils@5.0.0-beta.29 - @ai-sdk/provider@4.0.0-beta.14 ## @ai-sdk/mistral@4.0.0-beta.32 ### Patch Changes - 9bd6512: feat(provider): change file part data property to be tagged with a type and remove the image part type - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - @ai-sdk/provider-utils@5.0.0-beta.29 - @ai-sdk/provider@4.0.0-beta.14 ## @ai-sdk/moonshotai@3.0.0-beta.34 ### Patch Changes - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - @ai-sdk/openai-compatible@3.0.0-beta.34 - @ai-sdk/provider-utils@5.0.0-beta.29 - @ai-sdk/provider@4.0.0-beta.14 ## @ai-sdk/open-responses@2.0.0-beta.32 ### Patch Changes - 9bd6512: feat(provider): change file part data property to be tagged with a type and remove the image part type - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - @ai-sdk/provider-utils@5.0.0-beta.29 - @ai-sdk/provider@4.0.0-beta.14 ## @ai-sdk/openai@4.0.0-beta.41 ### Patch Changes - 9bd6512: feat(provider): change file part data property to be tagged with a type and remove the image part type - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - @ai-sdk/provider-utils@5.0.0-beta.29 - @ai-sdk/provider@4.0.0-beta.14 ## @ai-sdk/openai-compatible@3.0.0-beta.34 ### Patch Changes - 9bd6512: feat(provider): change file part data property to be tagged with a type and remove the image part type - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - @ai-sdk/provider-utils@5.0.0-beta.29 - @ai-sdk/provider@4.0.0-beta.14 ## @ai-sdk/otel@1.0.0-beta.60 ### Patch Changes - 18651f6: feat(otel): add opt-in options for supplemental AI SDK attributes on OpenTelemetry spans - 9bd6512: feat(provider): change file part data property to be tagged with a type and remove the image part type - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [43a6750] - Updated dependencies [81caa5d] - Updated dependencies [1f7db50] - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [6147cdf] - ai@7.0.0-beta.114 - @ai-sdk/provider@4.0.0-beta.14 ## @ai-sdk/perplexity@4.0.0-beta.33 ### Patch Changes - 9bd6512: feat(provider): change file part data property to be tagged with a type and remove the image part type - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - @ai-sdk/provider-utils@5.0.0-beta.29 - @ai-sdk/provider@4.0.0-beta.14 ## @ai-sdk/prodia@2.0.0-beta.33 ### Patch Changes - 9bd6512: feat(provider): change file part data property to be tagged with a type and remove the image part type - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - @ai-sdk/provider-utils@5.0.0-beta.29 - @ai-sdk/provider@4.0.0-beta.14 ## @ai-sdk/provider-utils@5.0.0-beta.29 ### Patch Changes - 9bd6512: feat(provider): change file part data property to be tagged with a type and remove the image part type - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - b6783da: refactoring: restructure Tool types - Updated dependencies [9bd6512] - Updated dependencies [258c093] - @ai-sdk/provider@4.0.0-beta.14 ## @ai-sdk/react@4.0.0-beta.114 ### Patch Changes - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [43a6750] - Updated dependencies [81caa5d] - Updated dependencies [1f7db50] - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - Updated dependencies [6147cdf] - ai@7.0.0-beta.114 - @ai-sdk/provider-utils@5.0.0-beta.29 ## @ai-sdk/replicate@3.0.0-beta.31 ### Patch Changes - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - @ai-sdk/provider-utils@5.0.0-beta.29 - @ai-sdk/provider@4.0.0-beta.14 ## @ai-sdk/revai@3.0.0-beta.31 ### Patch Changes - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - @ai-sdk/provider-utils@5.0.0-beta.29 - @ai-sdk/provider@4.0.0-beta.14 ## @ai-sdk/rsc@3.0.0-beta.115 ### Patch Changes - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [43a6750] - Updated dependencies [81caa5d] - Updated dependencies [1f7db50] - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - Updated dependencies [6147cdf] - ai@7.0.0-beta.114 - @ai-sdk/provider-utils@5.0.0-beta.29 - @ai-sdk/provider@4.0.0-beta.14 ## @ai-sdk/svelte@5.0.0-beta.114 ### Patch Changes - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [43a6750] - Updated dependencies [81caa5d] - Updated dependencies [1f7db50] - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - Updated dependencies [6147cdf] - ai@7.0.0-beta.114 - @ai-sdk/provider-utils@5.0.0-beta.29 ## @ai-sdk/test-server@2.0.0-beta.3 ### Patch Changes - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles ## @ai-sdk/togetherai@3.0.0-beta.34 ### Patch Changes - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - @ai-sdk/openai-compatible@3.0.0-beta.34 - @ai-sdk/provider-utils@5.0.0-beta.29 - @ai-sdk/provider@4.0.0-beta.14 ## @ai-sdk/valibot@3.0.0-beta.29 ### Patch Changes - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - @ai-sdk/provider-utils@5.0.0-beta.29 ## @ai-sdk/vercel@3.0.0-beta.34 ### Patch Changes - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - @ai-sdk/openai-compatible@3.0.0-beta.34 - @ai-sdk/provider-utils@5.0.0-beta.29 - @ai-sdk/provider@4.0.0-beta.14 ## @ai-sdk/voyage@1.0.0-beta.3 ### Patch Changes - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - @ai-sdk/provider-utils@5.0.0-beta.29 - @ai-sdk/provider@4.0.0-beta.14 ## @ai-sdk/vue@4.0.0-beta.114 ### Patch Changes - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [43a6750] - Updated dependencies [81caa5d] - Updated dependencies [1f7db50] - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - Updated dependencies [6147cdf] - ai@7.0.0-beta.114 - @ai-sdk/provider-utils@5.0.0-beta.29 ## @ai-sdk/workflow@1.0.0-beta.29 ### Patch Changes - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [43a6750] - Updated dependencies [81caa5d] - Updated dependencies [1f7db50] - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - Updated dependencies [6147cdf] - ai@7.0.0-beta.114 - @ai-sdk/provider-utils@5.0.0-beta.29 - @ai-sdk/provider@4.0.0-beta.14 ## @ai-sdk/xai@4.0.0-beta.47 ### Patch Changes - 9bd6512: feat(provider): change file part data property to be tagged with a type and remove the image part type - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles - Updated dependencies [9bd6512] - Updated dependencies [258c093] - Updated dependencies [b6783da] - @ai-sdk/openai-compatible@3.0.0-beta.34 - @ai-sdk/provider-utils@5.0.0-beta.29 - @ai-sdk/provider@4.0.0-beta.14 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
## Background Diagnostics channels are a way to relay event data and it works on a publisher/subscriber mechanism. Some o11y providers had a request from us to emit the event data for telemetry through diagnostics channels instead of the callbacks ## Summary the telemetry dispatcher now also publishes the same augmented lifecycle event to the diagnostics channel named `aisdk:telemetry` ## Manual Verification ran the example `examples/ai-functions/src/telemetry/diagnostic-channel/generate-text.ts` ## Checklist - [x] All commits are signed (PRs with unsigned commits cannot be merged) - [x] Tests have been added / updated (for bug fixes / features) - [x] Documentation has been added / updated (for bug fixes / features) - [x] A _patch_ changeset for relevant packages has been added (for bug fixes / features - run `pnpm changeset` in the project root) - [x] I have reviewed this pull request (self-review)
…token generation (#14857)
…ia `konsistent`) (#14648) ## Background As part of the effort of making our codebase more consistent, which helps for both human and agentic understanding of the codebase by recognizing patterns, I have been working on a general CLI tool meant to help with this task. The CLI tool, called `konsistent` (German for "consistent"), is a generally applicable tool that anyone can use on their codebase, but the AI SDK was my main inspiration for creating it, and it presents a perfect use case. You define the rules that you want to enforce in a `konsistent.json` file, and then the CLI can check your codebase against those rules. For more information, please see https://www.npmjs.com/package/konsistent/v/0.0.1-alpha.13 (very early release, not yet ready for broader consumption). ## Summary I created a `konsistent.json` config file with code patterns I observed in the majority of our provider implementations. Of course we only adhere to any convention to some extent, but that's exactly what the `konsistent` CLI should help us with. Here's the AI SDK's tentative `konsistent.json` file: https://github.com/vercel/ai/blob/fa/konsistent/konsistent.json I already did some very minor cleanup, but only on things that don't cause _any_ harm / possible breakage whatsoever. The config file I created is a starting point, and it points out several violations in our codebase already. We should review those cases and decide: - for each conflicting convention, which one do we want to follow? - for any other more specific violations, should we fix them, or do we consider them an exception, or is enforcing that specific pattern simply too strict? Once we have made those decisions, we can fix the codebase as needed. Since we are in v7 beta stage, this is the perfect time to e.g. rename some exported symbols for consistency. We can keep back compat via deprecated aliases. As a starting point for our review, here's the current violations that running `pnpm konsistent` against our codebase (with the `konsistent.json` config file from this PR) produces: ``` packages/codemod - error Missing required file: src/index.ts [package-dir-must-have-required-files] packages/mcp - error Missing required file: README.md [package-dir-must-have-required-files] packages/otel - error Missing required file: README.md [package-dir-must-have-required-files] packages/svelte - error Missing required file: tsup.config.ts [package-dir-must-have-required-files] packages/voyage - error Missing required file: README.md [package-dir-must-have-required-files] packages/alibaba/src/alibaba-chat-language-model.ts - error Missing export type "AlibabaLanguageModelChatOptions" [provider-model-file-with-subtype-must-export-model-class-and-options-type] - error Missing export class "AlibabaChatLanguageModel" [provider-model-file-with-subtype-must-export-model-class-and-options-type] packages/azure/src/index.ts - error Missing required file: azure-provider.ts [provider-package-must-export-instance-and-creator] - error Missing export type "AzureProvider" from "./azure-provider" [provider-package-must-export-instance-and-creator] - error Missing export type "AzureProviderSettings" from "./azure-provider" [provider-package-must-export-instance-and-creator] packages/amazon-bedrock/src/index.ts - error Missing required file: amazon-bedrock-provider.ts [provider-package-must-export-instance-and-creator] - error Missing export "amazonbedrock" [provider-package-must-export-instance-and-creator] - error Missing export type "AmazonBedrockProvider" from "./amazon-bedrock-provider" [provider-package-must-export-instance-and-creator] - error Missing export type "AmazonBedrockProviderSettings" from "./amazon-bedrock-provider" [provider-package-must-export-instance-and-creator] packages/black-forest-labs/src/index.ts - error Missing export "blackforestlabs" [provider-package-must-export-instance-and-creator] packages/black-forest-labs/src/black-forest-labs-provider.ts - error Missing export constant "blackforestlabs" [provider-file-must-export-provider-class-and-settings-type] packages/bytedance/src/index.ts - error Missing export "bytedance" [provider-package-must-export-instance-and-creator] packages/bytedance/src/bytedance-provider.ts - error Missing export constant "bytedance" [provider-file-must-export-provider-class-and-settings-type] packages/anthropic/src/anthropic-language-model.ts - error Missing export type "AnthropicLanguageModelOptions" [provider-model-file-must-export-model-class-and-options-type] packages/cohere/src/cohere-embedding-model.ts - error Missing export type "CohereEmbeddingModelOptions" [provider-model-file-must-export-model-class-and-options-type] packages/cohere/src/reranking/cohere-reranking-model.ts - error Missing export type "CohereRerankingModelOptions" [provider-model-file-must-export-model-class-and-options-type] packages/cohere/src/cohere-chat-language-model.ts - error Missing export type "CohereLanguageModelChatOptions" [provider-model-file-with-subtype-must-export-model-class-and-options-type] packages/deepinfra/src/deepinfra-image-model.ts - error Missing export type "DeepInfraImageModelOptions" [provider-model-file-must-export-model-class-and-options-type] packages/deepinfra/src/deepinfra-chat-language-model.ts - error Missing export type "DeepInfraLanguageModelChatOptions" [provider-model-file-with-subtype-must-export-model-class-and-options-type] - error Missing import type "LanguageModelV4" [provider-model-file-with-subtype-must-export-model-class-and-options-type] 21 error Class "DeepInfraChatLanguageModel" must implement "LanguageModelV4" [provider-model-file-with-subtype-must-export-model-class-and-options-type] packages/deepseek/src/chat/deepseek-chat-language-model.ts - error Missing export type "DeepSeekLanguageModelChatOptions" [provider-model-file-with-subtype-must-export-model-class-and-options-type] packages/fal/src/fal-image-model.ts - error Missing export type "FalImageModelOptions" [provider-model-file-must-export-model-class-and-options-type] packages/fireworks/src/fireworks-image-model.ts - error Missing export type "FireworksImageModelOptions" [provider-model-file-must-export-model-class-and-options-type] packages/gateway/src/index.ts - error Missing export "createGateway" [provider-package-must-export-instance-and-creator] - error Missing export "VERSION" [provider-package-must-export-instance-and-creator] packages/gateway/src/gateway-provider.ts - error Missing export function "createGateway" [provider-file-must-export-provider-class-and-settings-type] packages/gateway/src/gateway-embedding-model.ts - error Missing export type "GatewayEmbeddingModelOptions" [provider-model-file-must-export-model-class-and-options-type] packages/gateway/src/gateway-image-model.ts - error Missing export type "GatewayImageModelOptions" [provider-model-file-must-export-model-class-and-options-type] packages/gateway/src/gateway-language-model.ts - error Missing export type "GatewayLanguageModelOptions" [provider-model-file-must-export-model-class-and-options-type] packages/gateway/src/gateway-reranking-model.ts - error Missing export type "GatewayRerankingModelOptions" [provider-model-file-must-export-model-class-and-options-type] packages/huggingface/src/index.ts - error Missing export "VERSION" [provider-package-must-export-instance-and-creator] packages/huggingface/src/responses/huggingface-responses-language-model.ts - error Missing export type "HuggingFaceLanguageModelResponsesOptions" [provider-model-file-with-subtype-must-export-model-class-and-options-type] packages/google-vertex/src/index.ts - error Missing export "googlevertex" [provider-package-must-export-instance-and-creator] - error Missing export "createGoogleVertex" [provider-package-must-export-instance-and-creator] - error Missing export type "GoogleVertexProvider" from "./google-vertex-provider" [provider-package-must-export-instance-and-creator] - error Missing export type "GoogleVertexProviderSettings" from "./google-vertex-provider" [provider-package-must-export-instance-and-creator] packages/google-vertex/src/google-vertex-provider.ts - error Missing export constant "googlevertex" [provider-file-must-export-provider-class-and-settings-type] - error Missing export function "createGoogleVertex" [provider-file-must-export-provider-class-and-settings-type] packages/google-vertex/src/google-vertex-embedding-model.ts - error Missing export type "GoogleVertexEmbeddingModelOptions" [provider-model-file-must-export-model-class-and-options-type] packages/groq/src/groq-transcription-model.ts - error Missing export type "GroqTranscriptionModelOptions" [provider-model-file-must-export-model-class-and-options-type] packages/groq/src/groq-chat-language-model.ts - error Missing export type "GroqLanguageModelChatOptions" [provider-model-file-with-subtype-must-export-model-class-and-options-type] packages/hume/src/hume-provider.ts 10 error Interface "HumeProvider" must extend "ProviderV4" [provider-file-must-export-provider-class-and-settings-type] packages/klingai/src/index.ts - error Missing export "VERSION" [provider-package-must-export-instance-and-creator] packages/lmnt/src/lmnt-provider.ts 11 error Interface "LMNTProvider" must extend "ProviderV4" [provider-file-must-export-provider-class-and-settings-type] packages/google/src/google-embedding-model.ts - error Missing export type "GoogleEmbeddingModelOptions" [provider-model-file-must-export-model-class-and-options-type] packages/google/src/google-language-model.ts - error Missing export type "GoogleLanguageModelOptions" [provider-model-file-must-export-model-class-and-options-type] packages/moonshotai/src/index.ts - error Missing export "VERSION" [provider-package-must-export-instance-and-creator] packages/moonshotai/src/moonshotai-chat-language-model.ts - error Missing export type "MoonshotAILanguageModelChatOptions" [provider-model-file-with-subtype-must-export-model-class-and-options-type] - error Missing import type "LanguageModelV4" [provider-model-file-with-subtype-must-export-model-class-and-options-type] 17 error Class "MoonshotAIChatLanguageModel" must implement "LanguageModelV4" [provider-model-file-with-subtype-must-export-model-class-and-options-type] packages/openai/src/embedding/openai-embedding-model.ts - error Missing export type "OpenAIEmbeddingModelOptions" [provider-model-file-must-export-model-class-and-options-type] packages/openai/src/image/openai-image-model.ts - error Missing export type "OpenAIImageModelOptions" [provider-model-file-must-export-model-class-and-options-type] packages/openai/src/speech/openai-speech-model.ts - error Missing export type "OpenAISpeechModelOptions" [provider-model-file-must-export-model-class-and-options-type] packages/openai/src/transcription/openai-transcription-model.ts - error Missing export type "OpenAITranscriptionModelOptions" [provider-model-file-must-export-model-class-and-options-type] packages/openai/src/chat/openai-chat-language-model.ts - error Missing export type "OpenAILanguageModelChatOptions" [provider-model-file-with-subtype-must-export-model-class-and-options-type] packages/openai/src/completion/openai-completion-language-model.ts - error Missing export type "OpenAILanguageModelCompletionOptions" [provider-model-file-with-subtype-must-export-model-class-and-options-type] packages/openai/src/responses/openai-responses-language-model.ts - error Missing export type "OpenAILanguageModelResponsesOptions" [provider-model-file-with-subtype-must-export-model-class-and-options-type] packages/openai-compatible/src/index.ts - error Missing export "openaicompatible" [provider-package-must-export-instance-and-creator] packages/openai-compatible/src/openai-compatible-provider.ts - error Missing export constant "openaicompatible" [provider-file-must-export-provider-class-and-settings-type] 22 error Interface "OpenAICompatibleProvider" must extend "ProviderV4" [provider-file-must-export-provider-class-and-settings-type] 112 error Function "createOpenAICompatible" must return value of type "OpenAICompatibleProvider" [provider-file-must-export-provider-class-and-settings-type] packages/openai-compatible/src/embedding/openai-compatible-embedding-model.ts - error Missing export type "OpenAICompatibleEmbeddingModelOptions" [provider-model-file-must-export-model-class-and-options-type] packages/openai-compatible/src/image/openai-compatible-image-model.ts - error Missing export type "OpenAICompatibleImageModelOptions" [provider-model-file-must-export-model-class-and-options-type] packages/openai-compatible/src/chat/openai-compatible-chat-language-model.ts - error Missing export type "OpenAICompatibleLanguageModelChatOptions" [provider-model-file-with-subtype-must-export-model-class-and-options-type] packages/openai-compatible/src/completion/openai-compatible-completion-language-model.ts - error Missing export type "OpenAICompatibleLanguageModelCompletionOptions" [provider-model-file-with-subtype-must-export-model-class-and-options-type] packages/open-responses/src/index.ts - error Missing export "openresponses" [provider-package-must-export-instance-and-creator] - error Missing export type "OpenResponsesProvider" from "./open-responses-provider" [provider-package-must-export-instance-and-creator] - error Missing export type "OpenResponsesProviderSettings" from "./open-responses-provider" [provider-package-must-export-instance-and-creator] packages/open-responses/src/open-responses-provider.ts - error Missing export constant "openresponses" [provider-file-must-export-provider-class-and-settings-type] packages/open-responses/src/responses/open-responses-language-model.ts - error Missing export type "OpenResponsesLanguageModelOptions" [provider-model-file-must-export-model-class-and-options-type] packages/perplexity/src/perplexity-language-model.ts - error Missing export type "PerplexityLanguageModelOptions" [provider-model-file-must-export-model-class-and-options-type] packages/mistral/src/mistral-embedding-model.ts - error Missing export type "MistralEmbeddingModelOptions" [provider-model-file-must-export-model-class-and-options-type] packages/mistral/src/mistral-chat-language-model.ts - error Missing export type "MistralLanguageModelChatOptions" [provider-model-file-with-subtype-must-export-model-class-and-options-type] packages/togetherai/src/reranking/togetherai-reranking-model.ts - error Missing export type "TogetherAIRerankingModelOptions" [provider-model-file-must-export-model-class-and-options-type] packages/voyage/src/voyage-embedding-model.ts - error Missing export type "VoyageEmbeddingModelOptions" [provider-model-file-must-export-model-class-and-options-type] packages/voyage/src/reranking/voyage-reranking-model.ts - error Missing export type "VoyageRerankingModelOptions" [provider-model-file-must-export-model-class-and-options-type] packages/xai/src/xai-image-model.ts - error Missing export type "XaiImageModelOptions" [provider-model-file-must-export-model-class-and-options-type] packages/xai/src/xai-chat-language-model.ts - error Missing export type "XaiLanguageModelChatOptions" [provider-model-file-with-subtype-must-export-model-class-and-options-type] packages/xai/src/responses/xai-responses-language-model.ts - error Missing export type "XaiLanguageModelResponsesOptions" [provider-model-file-with-subtype-must-export-model-class-and-options-type] Checked 94 files in 142ms. Found 85 errors. ```
## Background #14387 some users had the request of propagating the MCP server name, from which the tool originated, in the UI ## Summary expose providerMetadata on dynamic tools and then merge the providerMetadata that is returned from the model along with the static providerMetadata we define ## Manual Verification verified by running the example `http://localhost:3000/chat/mcp` ## Checklist - [x] All commits are signed (PRs with unsigned commits cannot be merged) - [x] Tests have been added / updated (for bug fixes / features) - [ ] Documentation has been added / updated (for bug fixes / features) - [x] A _patch_ changeset for relevant packages has been added (for bug fixes / features - run `pnpm changeset` in the project root) - [x] I have reviewed this pull request (self-review) ## Related Issues fixes #14387
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ `main` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `main`.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ # Releases ## @ai-sdk/alibaba@2.0.0-beta.37 ### Major Changes - 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases. ### Patch Changes - Updated dependencies [08d2129] - Updated dependencies [04e9009] - @ai-sdk/provider-utils@5.0.0-beta.30 - @ai-sdk/openai-compatible@3.0.0-beta.35 ## @ai-sdk/amazon-bedrock@5.0.0-beta.46 ### Major Changes - 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases. ### Patch Changes - Updated dependencies [08d2129] - Updated dependencies [04e9009] - @ai-sdk/provider-utils@5.0.0-beta.30 - @ai-sdk/anthropic@4.0.0-beta.42 ## @ai-sdk/anthropic@4.0.0-beta.42 ### Major Changes - 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases. ### Patch Changes - Updated dependencies [08d2129] - @ai-sdk/provider-utils@5.0.0-beta.30 ## @ai-sdk/assemblyai@3.0.0-beta.32 ### Major Changes - 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases. ### Patch Changes - Updated dependencies [08d2129] - @ai-sdk/provider-utils@5.0.0-beta.30 ## @ai-sdk/black-forest-labs@2.0.0-beta.31 ### Major Changes - 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases. ### Patch Changes - Updated dependencies [08d2129] - @ai-sdk/provider-utils@5.0.0-beta.30 ## @ai-sdk/cohere@4.0.0-beta.32 ### Major Changes - 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases. ### Patch Changes - Updated dependencies [08d2129] - @ai-sdk/provider-utils@5.0.0-beta.30 ## @ai-sdk/deepgram@3.0.0-beta.31 ### Major Changes - 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases. ### Patch Changes - Updated dependencies [08d2129] - @ai-sdk/provider-utils@5.0.0-beta.30 ## @ai-sdk/deepinfra@3.0.0-beta.35 ### Major Changes - 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases. ### Patch Changes - Updated dependencies [08d2129] - Updated dependencies [04e9009] - @ai-sdk/provider-utils@5.0.0-beta.30 - @ai-sdk/openai-compatible@3.0.0-beta.35 ## @ai-sdk/deepseek@3.0.0-beta.33 ### Major Changes - 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases. ### Patch Changes - Updated dependencies [08d2129] - @ai-sdk/provider-utils@5.0.0-beta.30 ## @ai-sdk/elevenlabs@3.0.0-beta.31 ### Major Changes - 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases. ### Patch Changes - Updated dependencies [08d2129] - @ai-sdk/provider-utils@5.0.0-beta.30 ## @ai-sdk/fal@3.0.0-beta.31 ### Major Changes - 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases. ### Patch Changes - Updated dependencies [08d2129] - @ai-sdk/provider-utils@5.0.0-beta.30 ## @ai-sdk/gateway@4.0.0-beta.66 ### Major Changes - 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases. ### Patch Changes - be09425: chore(provider/gateway): update gateway model settings files - Updated dependencies [08d2129] - @ai-sdk/provider-utils@5.0.0-beta.30 ## @ai-sdk/gladia@3.0.0-beta.31 ### Major Changes - 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases. ### Patch Changes - Updated dependencies [08d2129] - @ai-sdk/provider-utils@5.0.0-beta.30 ## @ai-sdk/google@4.0.0-beta.49 ### Major Changes - 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases. ### Patch Changes - Updated dependencies [08d2129] - @ai-sdk/provider-utils@5.0.0-beta.30 ## @ai-sdk/google-vertex@5.0.0-beta.63 ### Major Changes - 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases. ### Patch Changes - 780e563: feat(provider/google-vertex): allow overriding Vertex Anthropic auth token generation - Updated dependencies [08d2129] - Updated dependencies [04e9009] - @ai-sdk/provider-utils@5.0.0-beta.30 - @ai-sdk/openai-compatible@3.0.0-beta.35 - @ai-sdk/anthropic@4.0.0-beta.42 - @ai-sdk/google@4.0.0-beta.49 ## @ai-sdk/groq@4.0.0-beta.34 ### Major Changes - 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases. ### Patch Changes - Updated dependencies [08d2129] - @ai-sdk/provider-utils@5.0.0-beta.30 ## @ai-sdk/huggingface@2.0.0-beta.35 ### Major Changes - 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases. ### Patch Changes - Updated dependencies [08d2129] - Updated dependencies [04e9009] - @ai-sdk/provider-utils@5.0.0-beta.30 - @ai-sdk/openai-compatible@3.0.0-beta.35 ## @ai-sdk/hume@3.0.0-beta.31 ### Major Changes - 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases. ### Patch Changes - Updated dependencies [08d2129] - @ai-sdk/provider-utils@5.0.0-beta.30 ## @ai-sdk/klingai@4.0.0-beta.32 ### Major Changes - 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases. ### Patch Changes - Updated dependencies [08d2129] - @ai-sdk/provider-utils@5.0.0-beta.30 ## @ai-sdk/lmnt@3.0.0-beta.31 ### Major Changes - 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases. ### Patch Changes - Updated dependencies [08d2129] - @ai-sdk/provider-utils@5.0.0-beta.30 ## @ai-sdk/luma@3.0.0-beta.31 ### Major Changes - 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases. ### Patch Changes - Updated dependencies [08d2129] - @ai-sdk/provider-utils@5.0.0-beta.30 ## @ai-sdk/mistral@4.0.0-beta.33 ### Major Changes - 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases. ### Patch Changes - Updated dependencies [08d2129] - @ai-sdk/provider-utils@5.0.0-beta.30 ## @ai-sdk/moonshotai@3.0.0-beta.35 ### Major Changes - 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases. ### Patch Changes - Updated dependencies [08d2129] - Updated dependencies [04e9009] - @ai-sdk/provider-utils@5.0.0-beta.30 - @ai-sdk/openai-compatible@3.0.0-beta.35 ## @ai-sdk/open-responses@2.0.0-beta.33 ### Major Changes - 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases. ### Patch Changes - Updated dependencies [08d2129] - @ai-sdk/provider-utils@5.0.0-beta.30 ## @ai-sdk/openai@4.0.0-beta.42 ### Major Changes - 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases. ### Patch Changes - Updated dependencies [08d2129] - @ai-sdk/provider-utils@5.0.0-beta.30 ## @ai-sdk/openai-compatible@3.0.0-beta.35 ### Major Changes - 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases. ### Patch Changes - Updated dependencies [08d2129] - @ai-sdk/provider-utils@5.0.0-beta.30 ## @ai-sdk/perplexity@4.0.0-beta.34 ### Major Changes - 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases. ### Patch Changes - Updated dependencies [08d2129] - @ai-sdk/provider-utils@5.0.0-beta.30 ## @ai-sdk/prodia@2.0.0-beta.34 ### Major Changes - 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases. ### Patch Changes - Updated dependencies [08d2129] - @ai-sdk/provider-utils@5.0.0-beta.30 ## @ai-sdk/replicate@3.0.0-beta.32 ### Major Changes - 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases. ### Patch Changes - Updated dependencies [08d2129] - @ai-sdk/provider-utils@5.0.0-beta.30 ## @ai-sdk/revai@3.0.0-beta.32 ### Major Changes - 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases. ### Patch Changes - Updated dependencies [08d2129] - @ai-sdk/provider-utils@5.0.0-beta.30 ## @ai-sdk/togetherai@3.0.0-beta.35 ### Major Changes - 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases. ### Patch Changes - Updated dependencies [08d2129] - Updated dependencies [04e9009] - @ai-sdk/provider-utils@5.0.0-beta.30 - @ai-sdk/openai-compatible@3.0.0-beta.35 ## @ai-sdk/voyage@1.0.0-beta.4 ### Major Changes - 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases. ### Patch Changes - Updated dependencies [08d2129] - @ai-sdk/provider-utils@5.0.0-beta.30 ## @ai-sdk/xai@4.0.0-beta.48 ### Major Changes - 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases. ### Patch Changes - Updated dependencies [08d2129] - Updated dependencies [04e9009] - @ai-sdk/provider-utils@5.0.0-beta.30 - @ai-sdk/openai-compatible@3.0.0-beta.35 ## ai@7.0.0-beta.115 ### Patch Changes - 08d2129: feat(mcp): propagate the server name through dynamic tool parts - 202f107: feat(ai): create a diagnostics channel to push event data - Updated dependencies [08d2129] - Updated dependencies [04e9009] - Updated dependencies [be09425] - @ai-sdk/provider-utils@5.0.0-beta.30 - @ai-sdk/gateway@4.0.0-beta.66 ## @ai-sdk/angular@3.0.0-beta.115 ### Patch Changes - Updated dependencies [08d2129] - Updated dependencies [202f107] - @ai-sdk/provider-utils@5.0.0-beta.30 - ai@7.0.0-beta.115 ## @ai-sdk/azure@4.0.0-beta.42 ### Patch Changes - Updated dependencies [08d2129] - Updated dependencies [04e9009] - @ai-sdk/provider-utils@5.0.0-beta.30 - @ai-sdk/openai@4.0.0-beta.42 ## @ai-sdk/baseten@2.0.0-beta.35 ### Patch Changes - Updated dependencies [08d2129] - Updated dependencies [04e9009] - @ai-sdk/provider-utils@5.0.0-beta.30 - @ai-sdk/openai-compatible@3.0.0-beta.35 ## @ai-sdk/bytedance@2.0.0-beta.32 ### Patch Changes - Updated dependencies [08d2129] - @ai-sdk/provider-utils@5.0.0-beta.30 ## @ai-sdk/cerebras@3.0.0-beta.35 ### Patch Changes - Updated dependencies [08d2129] - Updated dependencies [04e9009] - @ai-sdk/provider-utils@5.0.0-beta.30 - @ai-sdk/openai-compatible@3.0.0-beta.35 ## @ai-sdk/fireworks@3.0.0-beta.35 ### Patch Changes - Updated dependencies [08d2129] - Updated dependencies [04e9009] - @ai-sdk/provider-utils@5.0.0-beta.30 - @ai-sdk/openai-compatible@3.0.0-beta.35 ## @ai-sdk/langchain@3.0.0-beta.115 ### Patch Changes - Updated dependencies [08d2129] - Updated dependencies [202f107] - ai@7.0.0-beta.115 ## @ai-sdk/llamaindex@3.0.0-beta.115 ### Patch Changes - Updated dependencies [08d2129] - Updated dependencies [202f107] - ai@7.0.0-beta.115 ## @ai-sdk/mcp@2.0.0-beta.37 ### Patch Changes - 08d2129: feat(mcp): propagate the server name through dynamic tool parts - Updated dependencies [08d2129] - @ai-sdk/provider-utils@5.0.0-beta.30 ## @ai-sdk/otel@1.0.0-beta.61 ### Patch Changes - Updated dependencies [08d2129] - Updated dependencies [202f107] - ai@7.0.0-beta.115 ## @ai-sdk/provider-utils@5.0.0-beta.30 ### Patch Changes - 08d2129: feat(mcp): propagate the server name through dynamic tool parts ## @ai-sdk/react@4.0.0-beta.115 ### Patch Changes - Updated dependencies [08d2129] - Updated dependencies [202f107] - @ai-sdk/provider-utils@5.0.0-beta.30 - ai@7.0.0-beta.115 ## @ai-sdk/rsc@3.0.0-beta.116 ### Patch Changes - Updated dependencies [08d2129] - Updated dependencies [202f107] - @ai-sdk/provider-utils@5.0.0-beta.30 - ai@7.0.0-beta.115 ## @ai-sdk/svelte@5.0.0-beta.115 ### Patch Changes - Updated dependencies [08d2129] - Updated dependencies [202f107] - @ai-sdk/provider-utils@5.0.0-beta.30 - ai@7.0.0-beta.115 ## @ai-sdk/valibot@3.0.0-beta.30 ### Patch Changes - Updated dependencies [08d2129] - @ai-sdk/provider-utils@5.0.0-beta.30 ## @ai-sdk/vercel@3.0.0-beta.35 ### Patch Changes - Updated dependencies [08d2129] - Updated dependencies [04e9009] - @ai-sdk/provider-utils@5.0.0-beta.30 - @ai-sdk/openai-compatible@3.0.0-beta.35 ## @ai-sdk/vue@4.0.0-beta.115 ### Patch Changes - Updated dependencies [08d2129] - Updated dependencies [202f107] - @ai-sdk/provider-utils@5.0.0-beta.30 - ai@7.0.0-beta.115 ## @ai-sdk/workflow@1.0.0-beta.30 ### Patch Changes - Updated dependencies [08d2129] - Updated dependencies [202f107] - @ai-sdk/provider-utils@5.0.0-beta.30 - ai@7.0.0-beta.115 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…e processing (#14863) ## Background The OpenAI image model spread `providerOptions.openai` directly into both the `/images/generations` JSON body and the `/images/edits` form data with no schema, so the field had no type information, no autocomplete, and no validation — silently passing through whatever shape the user provided. ## Summary Defined Zod schemas and types for `providerOptions.openai`: - `OpenAIImageModelOptions` — fields shared by both endpoints (`quality`, `background`, `outputFormat`, `outputCompression`, `user`) - `OpenAIImageModelGenerationOptions` — extends base for `/images/generations` (adds `style`, `moderation`) - `OpenAIImageModelEditOptions` — extends base for `/images/edits` (adds `inputFidelity`) See docs: - https://developers.openai.com/api/reference/resources/images/methods/generate - https://developers.openai.com/api/reference/resources/images/methods/edit ## Manual Verification Run any of the new examples. ## Checklist - [x] All commits are signed (PRs with unsigned commits cannot be merged) - [x] Tests have been added / updated (for bug fixes / features) - [x] Documentation has been added / updated (for bug fixes / features) - [x] A _patch_ changeset for relevant packages has been added (for bug fixes / features - run `pnpm changeset` in the project root) - [x] I have reviewed this pull request (self-review) ## Future Work N/A ## Related Issues Part of #14859
code snippet was highlighted incorrectly
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ `main` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `main`.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ # Releases ## @ai-sdk/azure@4.0.0-beta.43 ### Patch Changes - Updated dependencies [9ea40e0] - @ai-sdk/openai@4.0.0-beta.43 ## @ai-sdk/openai@4.0.0-beta.43 ### Patch Changes - 9ea40e0: chore(provider/openai): add type for image model options for type-safe processing Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…f sending them unsigned (#14765) ## Background When a conversation contains reasoning blocks signed by a different provider (e.g. Anthropic-signed reasoning replayed through Bedrock during cross-provider fallback), the converter pushes the reasoning text without a signature, and Bedrock's converse API rejects the request with: messages.N.content.M.thinking.signature: Field required `@ai-sdk/anthropic` already handles the symmetric case gracefully — it drops unrecognized reasoning metadata and emits a warning. ## Fix In the `case 'reasoning'` branch of `convertToBedrockChatMessages`, only fall through to the unsigned-reasoning push when `providerOptions` is empty or contains exclusively the `bedrock` key. Foreign-provider metadata (e.g. `anthropic`) causes the block to be dropped instead. This preserves the existing prefill behavior introduced in #13972 while fixing the cross-provider replay case. ## Repro A conversation that has assistant turns with `providerOptions.anthropic` on its reasoning parts, sent through `bedrock(...).doStream(...)`, currently reproduces the validation error. The added test covers this. After gh pr create runs, it'll print the PR URL. CI will run automatically; the CLA bot will comment with a sign link if you haven't signed before. Co-authored-by: asdf <asdfsdf>
…too long" error (#14884)
## Background Vertex supports xAI's Grok models https://docs.cloud.google.com/vertex-ai/generative-ai/docs/partner-models/grok The AI SDK didn't support those models yet ## Summary added a new provider within google vertex provider specific for XAI. Grok models couldn't be appended to just the MaaS provider since Grok models on vertex support structured outputs. ## Manual Verification - `examples/ai-functions/src/generate-text/google/vertex-xai-image-url.ts` - `examples/ai-functions/src/generate-text/google/vertex-xai-output-object.ts` - `examples/ai-functions/src/generate-text/google/vertex-xai-tool-call.ts` - `examples/ai-functions/src/generate-text/google/vertex-xai.ts` - `examples/ai-functions/src/stream-text/google/vertex-xai-output-object.ts` - `examples/ai-functions/src/stream-text/google/vertex-xai-tool-call.ts` - `examples/ai-functions/src/stream-text/google/vertex-xai.ts` ## Checklist - [x] All commits are signed (PRs with unsigned commits cannot be merged) - [x] Tests have been added / updated (for bug fixes / features) - [x] Documentation has been added / updated (for bug fixes / features) - [x] A _patch_ changeset for relevant packages has been added (for bug fixes / features - run `pnpm changeset` in the project root) - [x] I have reviewed this pull request (self-review)
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ `main` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `main`.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ # Releases ## @ai-sdk/alibaba@2.0.0-beta.38 ### Patch Changes - Updated dependencies [e59c955] - @ai-sdk/openai-compatible@3.0.0-beta.36 ## @ai-sdk/baseten@2.0.0-beta.36 ### Patch Changes - Updated dependencies [e59c955] - @ai-sdk/openai-compatible@3.0.0-beta.36 ## @ai-sdk/cerebras@3.0.0-beta.36 ### Patch Changes - Updated dependencies [e59c955] - @ai-sdk/openai-compatible@3.0.0-beta.36 ## @ai-sdk/deepinfra@3.0.0-beta.36 ### Patch Changes - Updated dependencies [e59c955] - @ai-sdk/openai-compatible@3.0.0-beta.36 ## @ai-sdk/fireworks@3.0.0-beta.36 ### Patch Changes - Updated dependencies [e59c955] - @ai-sdk/openai-compatible@3.0.0-beta.36 ## @ai-sdk/google-vertex@5.0.0-beta.64 ### Patch Changes - e59c955: feat(vertex): add grok models to vertex provider - Updated dependencies [e59c955] - @ai-sdk/openai-compatible@3.0.0-beta.36 ## @ai-sdk/huggingface@2.0.0-beta.36 ### Patch Changes - Updated dependencies [e59c955] - @ai-sdk/openai-compatible@3.0.0-beta.36 ## @ai-sdk/moonshotai@3.0.0-beta.36 ### Patch Changes - Updated dependencies [e59c955] - @ai-sdk/openai-compatible@3.0.0-beta.36 ## @ai-sdk/openai-compatible@3.0.0-beta.36 ### Patch Changes - e59c955: feat(vertex): add grok models to vertex provider ## @ai-sdk/togetherai@3.0.0-beta.36 ### Patch Changes - Updated dependencies [e59c955] - @ai-sdk/openai-compatible@3.0.0-beta.36 ## @ai-sdk/vercel@3.0.0-beta.36 ### Patch Changes - Updated dependencies [e59c955] - @ai-sdk/openai-compatible@3.0.0-beta.36 ## @ai-sdk/xai@4.0.0-beta.49 ### Patch Changes - Updated dependencies [e59c955] - @ai-sdk/openai-compatible@3.0.0-beta.36 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ `main` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `main`.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ # Releases ## @ai-sdk/azure@4.0.0-beta.44 ### Patch Changes - Updated dependencies [bada0f3] - @ai-sdk/openai@4.0.0-beta.44 ## @ai-sdk/openai@4.0.0-beta.44 ### Patch Changes - bada0f3: feat(openai): preserve `namespace` on function_call output items Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This is an automated update of the gateway model settings files.
…etry and fetch patching (#14365) ## Background `createAmazonBedrock()` calls either `createSigV4FetchFunction` or `createApiKeyFetchFunction` at provider initialization time. Both functions accepted the underlying fetch implementation via a default parameter: \`\`\`ts fetch: FetchFunction = globalThis.fetch \`\`\` JavaScript default parameters are evaluated at call time — meaning \`globalThis.fetch\` is read and captured the moment \`createAmazonBedrock()\` is called. Any patch to \`globalThis.fetch\` applied after that point is silently ignored for all Bedrock requests. The most common real-world impact is **telemetry instrumentation** (e.g. OpenTelemetry, Datadog, custom tracing), which typically patches \`globalThis.fetch\` at startup to intercept outgoing HTTP requests. Because Bedrock snapshots fetch before those patches are applied, all Bedrock requests bypass instrumentation. Test setups that patch \`globalThis.fetch\` after imports are equally affected. Every other provider in the SDK avoids this by deferring the \`globalThis.fetch\` lookup to request time. The comment in \`http-chat-transport.ts\` captures the intent explicitly: *"avoid caching globalThis.fetch in case it is patched by other libraries"*. ## Summary This PR makes \`createSigV4FetchFunction\` and \`createApiKeyFetchFunction\` resolve \`globalThis.fetch\` lazily inside the returned closure instead of at function call time. Changes included: - Removed the \`= globalThis.fetch\` default parameter from both functions, making \`fetch\` optional - Added \`const effectiveFetch = fetch ?? globalThis.fetch\` inside each returned closure, so the lookup happens at request time - Added a patch changeset for \`@ai-sdk/amazon-bedrock\` ## Manual Verification I manually verified by inspecting the call path from \`createAmazonBedrock()\` through to the SigV4 and API key fetch wrappers: - confirmed the default parameter no longer captures \`globalThis.fetch\` at provider initialization - confirmed each request-time closure now resolves \`globalThis.fetch\` fresh on every call, consistent with how \`post-to-api.ts\` and \`http-chat-transport.ts\` handle this ## Checklist - [x] All commits are signed (PRs with unsigned commits cannot be merged) - [x] Tests have been added / updated (for bug fixes / features) - [ ] Documentation has been added / updated (for bug fixes / features) - [x] A _patch_ changeset for relevant packages has been added (for bug fixes / features - run \`pnpm changeset\` in the project root) - [x] I have reviewed this pull request (self-review) ## Related Issue Fixes: #14364 --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ `main` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `main`.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ # Releases ## ai@7.0.0-beta.116 ### Patch Changes - Updated dependencies [e7e8f42] - @ai-sdk/gateway@4.0.0-beta.67 ## @ai-sdk/amazon-bedrock@5.0.0-beta.47 ### Patch Changes - d0dbd96: Fix `createAmazonBedrock()` capturing `globalThis.fetch` at initialization time, which caused telemetry instrumentation (e.g. OpenTelemetry, Datadog) and other `globalThis.fetch` patches applied after provider creation to be silently ignored. ## @ai-sdk/angular@3.0.0-beta.116 ### Patch Changes - ai@7.0.0-beta.116 ## @ai-sdk/gateway@4.0.0-beta.67 ### Patch Changes - e7e8f42: chore(provider/gateway): update gateway model settings files ## @ai-sdk/langchain@3.0.0-beta.116 ### Patch Changes - ai@7.0.0-beta.116 ## @ai-sdk/llamaindex@3.0.0-beta.116 ### Patch Changes - ai@7.0.0-beta.116 ## @ai-sdk/otel@1.0.0-beta.62 ### Patch Changes - ai@7.0.0-beta.116 ## @ai-sdk/react@4.0.0-beta.116 ### Patch Changes - ai@7.0.0-beta.116 ## @ai-sdk/rsc@3.0.0-beta.117 ### Patch Changes - ai@7.0.0-beta.116 ## @ai-sdk/svelte@5.0.0-beta.116 ### Patch Changes - ai@7.0.0-beta.116 ## @ai-sdk/vue@4.0.0-beta.116 ### Patch Changes - ai@7.0.0-beta.116 ## @ai-sdk/workflow@1.0.0-beta.31 ### Patch Changes - ai@7.0.0-beta.116 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
## Background
`@ai-sdk/google-vertex` used a module-level `GoogleAuth` cache in the
shared Node auth helper. That cache was invalidated by object reference
equality, which caused unnecessary `GoogleAuth` recreation in two cases:
1. Multiple provider instances with equivalent `googleAuthOptions` would
recreate auth when requests alternated between them.
2. When `googleAuthOptions` was omitted, `generateAuthToken(options ||
{})` created a new empty object on every call, so auth could be
recreated on every request even for a single provider.
Because `GoogleAuth` caches the resolved auth client on the instance,
recreating it discards warm auth state and can add avoidable auth
overhead.
## Summary
This PR removes the module-level `GoogleAuth` singleton from
`@ai-sdk/google-vertex`'s shared Node auth helper and replaces it with a
per-provider auth token generator.
Changes included:
- Replaced the shared `generateAuthToken(options)` helper with
`createAuthTokenGenerator(options)`, which creates one `GoogleAuth`
instance and returns a reusable token generator closure.
- Updated the Node provider entry points for:
- `@ai-sdk/google-vertex`
- `@ai-sdk/google-vertex/anthropic`
- `@ai-sdk/google-vertex/maas`
- Added regression tests covering:
- repeated calls with omitted `googleAuthOptions`
- repeated calls on a single provider instance
- per-provider generator creation for the Node provider variants
- Added a patch changeset for `@ai-sdk/google-vertex`
## Manual Verification
I manually verified the change by inspecting the Node auth flow and
confirming the auth generator is now created once during provider
construction rather than on each request path.
Concretely:
- confirmed each Node provider now creates
`createAuthTokenGenerator(options.googleAuthOptions)` once at provider
initialization
- confirmed request-time header/fetch code now calls the returned
generator with no options, so the `undefined -> {}` invalidation path is
gone
- confirmed the shared helper no longer stores module-level auth state
I also verified behavior through automated coverage:
- `pnpm --filter @ai-sdk/google-vertex test:node`
- `pnpm type-check:full`
## Checklist
- [x] All commits are signed (PRs with unsigned commits cannot be
merged)
- [x] Tests have been added / updated (for bug fixes / features)
- [ ] Documentation has been added / updated (for bug fixes / features)
- [x] A _patch_ changeset for relevant packages has been added (for bug
fixes / features - run `pnpm changeset` in the project root)
- [x] I have reviewed this pull request (self-review)
## Future Work
A follow-up PR could evaluate whether the Edge auth path should also
cache tokens or auth state more aggressively, since it uses a different
implementation and is not addressed here.
## Related Issues
Fixes #14101
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ `main` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `main`.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ # Releases ## @ai-sdk/google-vertex@5.0.0-beta.65 ### Patch Changes - 96d056d: fix(provider/google-vertex): avoid recreating Node GoogleAuth clients for repeated requests Create Google auth token generators per provider instance instead of using a module-level shared `GoogleAuth` cache. This avoids unnecessary `GoogleAuth` recreation when `googleAuthOptions` are omitted or when multiple provider instances use equivalent auth settings. Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
## Background the change in #14102 didn't pull from latest main and didn't account for the latest vertex/xai package created. and thus `main` on that path was using the wrong import ## Summary use correct import
…it's fixed (#14873) ## Background follow up to #14863 - missed removing the exclusion, related to #14859 ## Checklist <!-- Do not edit this list. Leave items unchecked that don't apply. If you need to track subtasks, create a new "## Tasks" section Please check if the PR fulfills the following requirements: --> - [x] All commits are signed (PRs with unsigned commits cannot be merged) - [ ] Tests have been added / updated (for bug fixes / features) - [ ] Documentation has been added / updated (for bug fixes / features) - [ ] A _patch_ changeset for relevant packages has been added (for bug fixes / features - run `pnpm changeset` in the project root) - [x] I have reviewed this pull request (self-review)
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ `main` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `main`.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ # Releases ## @ai-sdk/google-vertex@5.0.0-beta.66 ### Patch Changes - 1f4058f: fix(vertex): use correct import for token generator Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Switches the pre-release npm tag from `beta` to `canary`. Major/minor/patch versions are preserved, and the increment counter is carried over (e.g. `7.0.0-beta.116` → `7.0.0-canary.116`). The next changeset bump produces `7.0.0-canary.117`. Modeled on the previous switch from `canary` → `alpha` in [ec517bb](ec517bb) ([#6355](#6355)). Two intentional deviations from that PR: - That PR reset the increment to `.0`; this one preserves it so canary picks up where beta left off. - That PR also refreshed `initialVersions` in `pre.json`; this one leaves it untouched. `initialVersions` is informational — the next-version computation reads from current `package.json`, not from this field, so leaving it stale has no effect on the release plan.
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ `main` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `main`.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ # Releases ## ai@7.0.0-canary.117 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/provider-utils@5.0.0-canary.31 - @ai-sdk/provider@4.0.0-canary.15 - @ai-sdk/gateway@4.0.0-canary.68 ## @ai-sdk/alibaba@2.0.0-canary.39 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/openai-compatible@3.0.0-canary.37 - @ai-sdk/provider-utils@5.0.0-canary.31 - @ai-sdk/provider@4.0.0-canary.15 ## @ai-sdk/amazon-bedrock@5.0.0-canary.48 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/provider-utils@5.0.0-canary.31 - @ai-sdk/anthropic@4.0.0-canary.43 - @ai-sdk/provider@4.0.0-canary.15 ## @ai-sdk/angular@3.0.0-canary.117 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/provider-utils@5.0.0-canary.31 - ai@7.0.0-canary.117 ## @ai-sdk/anthropic@4.0.0-canary.43 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/provider-utils@5.0.0-canary.31 - @ai-sdk/provider@4.0.0-canary.15 ## @ai-sdk/assemblyai@3.0.0-canary.33 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/provider-utils@5.0.0-canary.31 - @ai-sdk/provider@4.0.0-canary.15 ## @ai-sdk/azure@4.0.0-canary.45 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/provider-utils@5.0.0-canary.31 - @ai-sdk/provider@4.0.0-canary.15 - @ai-sdk/openai@4.0.0-canary.45 ## @ai-sdk/baseten@2.0.0-canary.37 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/openai-compatible@3.0.0-canary.37 - @ai-sdk/provider-utils@5.0.0-canary.31 - @ai-sdk/provider@4.0.0-canary.15 ## @ai-sdk/black-forest-labs@2.0.0-canary.32 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/provider-utils@5.0.0-canary.31 - @ai-sdk/provider@4.0.0-canary.15 ## @ai-sdk/bytedance@2.0.0-canary.33 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/provider-utils@5.0.0-canary.31 - @ai-sdk/provider@4.0.0-canary.15 ## @ai-sdk/cerebras@3.0.0-canary.37 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/openai-compatible@3.0.0-canary.37 - @ai-sdk/provider-utils@5.0.0-canary.31 - @ai-sdk/provider@4.0.0-canary.15 ## @ai-sdk/codemod@4.0.0-canary.5 ### Patch Changes - 0c4c275: trigger initial canary release ## @ai-sdk/cohere@4.0.0-canary.33 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/provider-utils@5.0.0-canary.31 - @ai-sdk/provider@4.0.0-canary.15 ## @ai-sdk/deepgram@3.0.0-canary.32 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/provider-utils@5.0.0-canary.31 - @ai-sdk/provider@4.0.0-canary.15 ## @ai-sdk/deepinfra@3.0.0-canary.37 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/openai-compatible@3.0.0-canary.37 - @ai-sdk/provider-utils@5.0.0-canary.31 - @ai-sdk/provider@4.0.0-canary.15 ## @ai-sdk/deepseek@3.0.0-canary.34 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/provider-utils@5.0.0-canary.31 - @ai-sdk/provider@4.0.0-canary.15 ## @ai-sdk/devtools@1.0.0-canary.20 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/provider@4.0.0-canary.15 ## @ai-sdk/elevenlabs@3.0.0-canary.32 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/provider-utils@5.0.0-canary.31 - @ai-sdk/provider@4.0.0-canary.15 ## @ai-sdk/fal@3.0.0-canary.32 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/provider-utils@5.0.0-canary.31 - @ai-sdk/provider@4.0.0-canary.15 ## @ai-sdk/fireworks@3.0.0-canary.37 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/openai-compatible@3.0.0-canary.37 - @ai-sdk/provider-utils@5.0.0-canary.31 - @ai-sdk/provider@4.0.0-canary.15 ## @ai-sdk/gateway@4.0.0-canary.68 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/provider-utils@5.0.0-canary.31 - @ai-sdk/provider@4.0.0-canary.15 ## @ai-sdk/gladia@3.0.0-canary.32 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/provider-utils@5.0.0-canary.31 - @ai-sdk/provider@4.0.0-canary.15 ## @ai-sdk/google@4.0.0-canary.50 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/provider-utils@5.0.0-canary.31 - @ai-sdk/provider@4.0.0-canary.15 ## @ai-sdk/google-vertex@5.0.0-canary.67 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/openai-compatible@3.0.0-canary.37 - @ai-sdk/provider-utils@5.0.0-canary.31 - @ai-sdk/anthropic@4.0.0-canary.43 - @ai-sdk/provider@4.0.0-canary.15 - @ai-sdk/google@4.0.0-canary.50 ## @ai-sdk/groq@4.0.0-canary.35 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/provider-utils@5.0.0-canary.31 - @ai-sdk/provider@4.0.0-canary.15 ## @ai-sdk/huggingface@2.0.0-canary.37 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/openai-compatible@3.0.0-canary.37 - @ai-sdk/provider-utils@5.0.0-canary.31 - @ai-sdk/provider@4.0.0-canary.15 ## @ai-sdk/hume@3.0.0-canary.32 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/provider-utils@5.0.0-canary.31 - @ai-sdk/provider@4.0.0-canary.15 ## @ai-sdk/klingai@4.0.0-canary.33 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/provider-utils@5.0.0-canary.31 - @ai-sdk/provider@4.0.0-canary.15 ## @ai-sdk/langchain@3.0.0-canary.117 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - ai@7.0.0-canary.117 ## @ai-sdk/llamaindex@3.0.0-canary.117 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - ai@7.0.0-canary.117 ## @ai-sdk/lmnt@3.0.0-canary.32 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/provider-utils@5.0.0-canary.31 - @ai-sdk/provider@4.0.0-canary.15 ## @ai-sdk/luma@3.0.0-canary.32 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/provider-utils@5.0.0-canary.31 - @ai-sdk/provider@4.0.0-canary.15 ## @ai-sdk/mcp@2.0.0-canary.38 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/provider-utils@5.0.0-canary.31 - @ai-sdk/provider@4.0.0-canary.15 ## @ai-sdk/mistral@4.0.0-canary.34 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/provider-utils@5.0.0-canary.31 - @ai-sdk/provider@4.0.0-canary.15 ## @ai-sdk/moonshotai@3.0.0-canary.37 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/openai-compatible@3.0.0-canary.37 - @ai-sdk/provider-utils@5.0.0-canary.31 - @ai-sdk/provider@4.0.0-canary.15 ## @ai-sdk/open-responses@2.0.0-canary.34 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/provider-utils@5.0.0-canary.31 - @ai-sdk/provider@4.0.0-canary.15 ## @ai-sdk/openai@4.0.0-canary.45 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/provider-utils@5.0.0-canary.31 - @ai-sdk/provider@4.0.0-canary.15 ## @ai-sdk/openai-compatible@3.0.0-canary.37 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/provider-utils@5.0.0-canary.31 - @ai-sdk/provider@4.0.0-canary.15 ## @ai-sdk/otel@1.0.0-canary.63 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/provider@4.0.0-canary.15 - ai@7.0.0-canary.117 ## @ai-sdk/perplexity@4.0.0-canary.35 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/provider-utils@5.0.0-canary.31 - @ai-sdk/provider@4.0.0-canary.15 ## @ai-sdk/prodia@2.0.0-canary.35 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/provider-utils@5.0.0-canary.31 - @ai-sdk/provider@4.0.0-canary.15 ## @ai-sdk/provider@4.0.0-canary.15 ### Patch Changes - 0c4c275: trigger initial canary release ## @ai-sdk/provider-utils@5.0.0-canary.31 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/provider@4.0.0-canary.15 ## @ai-sdk/react@4.0.0-canary.117 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/provider-utils@5.0.0-canary.31 - ai@7.0.0-canary.117 ## @ai-sdk/replicate@3.0.0-canary.33 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/provider-utils@5.0.0-canary.31 - @ai-sdk/provider@4.0.0-canary.15 ## @ai-sdk/revai@3.0.0-canary.33 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/provider-utils@5.0.0-canary.31 - @ai-sdk/provider@4.0.0-canary.15 ## @ai-sdk/rsc@3.0.0-canary.118 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/provider-utils@5.0.0-canary.31 - @ai-sdk/provider@4.0.0-canary.15 - ai@7.0.0-canary.117 ## @ai-sdk/svelte@5.0.0-canary.117 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/provider-utils@5.0.0-canary.31 - ai@7.0.0-canary.117 ## @ai-sdk/test-server@2.0.0-canary.4 ### Patch Changes - 0c4c275: trigger initial canary release ## @ai-sdk/togetherai@3.0.0-canary.37 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/openai-compatible@3.0.0-canary.37 - @ai-sdk/provider-utils@5.0.0-canary.31 - @ai-sdk/provider@4.0.0-canary.15 ## @ai-sdk/valibot@3.0.0-canary.31 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/provider-utils@5.0.0-canary.31 ## @ai-sdk/vercel@3.0.0-canary.37 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/openai-compatible@3.0.0-canary.37 - @ai-sdk/provider-utils@5.0.0-canary.31 - @ai-sdk/provider@4.0.0-canary.15 ## @ai-sdk/voyage@1.0.0-canary.5 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/provider-utils@5.0.0-canary.31 - @ai-sdk/provider@4.0.0-canary.15 ## @ai-sdk/vue@4.0.0-canary.117 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/provider-utils@5.0.0-canary.31 - ai@7.0.0-canary.117 ## @ai-sdk/workflow@1.0.0-canary.32 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/provider-utils@5.0.0-canary.31 - @ai-sdk/provider@4.0.0-canary.15 - ai@7.0.0-canary.117 ## @ai-sdk/xai@4.0.0-canary.50 ### Patch Changes - 0c4c275: trigger initial canary release - Updated dependencies [0c4c275] - @ai-sdk/openai-compatible@3.0.0-canary.37 - @ai-sdk/provider-utils@5.0.0-canary.31 - @ai-sdk/provider@4.0.0-canary.15 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
Summary
Manual Verification
Checklist
pnpm changesetin the project root)pnpm prettier-fixin the project root)Future Work
Related Issues